home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 21 / Cream of the Crop 21 (Terry Blount) (October 1996).iso / program / mcstr_32.zip / _STRING.FRM < prev    next >
Text File  |  1996-06-25  |  82KB  |  2,802 lines

  1. VERSION 4.00
  2. Begin VB.Form frmString 
  3.    BorderStyle     =   4  'Fixed ToolWindow
  4.    Caption         =   "String"
  5.    ClientHeight    =   5235
  6.    ClientLeft      =   330
  7.    ClientTop       =   2385
  8.    ClientWidth     =   7785
  9.    Height          =   5640
  10.    Left            =   270
  11.    MaxButton       =   0   'False
  12.    MDIChild        =   -1  'True
  13.    ScaleHeight     =   5235
  14.    ScaleWidth      =   7785
  15.    ShowInTaskbar   =   0   'False
  16.    Top             =   2040
  17.    Width           =   7905
  18.    Begin VB.TextBox txt_Result 
  19.       BackColor       =   &H00C0C0C0&
  20.       BorderStyle     =   0  'None
  21.       Height          =   4005
  22.       Left            =   105
  23.       Locked          =   -1  'True
  24.       MultiLine       =   -1  'True
  25.       ScrollBars      =   2  'Vertical
  26.       TabIndex        =   8
  27.       Top             =   630
  28.       Width           =   7575
  29.    End
  30.    Begin Threed.SSPanel SSPanel1 
  31.       Align           =   1  'Align Top
  32.       Height          =   480
  33.       Left            =   0
  34.       TabIndex        =   0
  35.       Top             =   0
  36.       Width           =   7785
  37.       _Version        =   65536
  38.       _ExtentX        =   13732
  39.       _ExtentY        =   847
  40.       _StockProps     =   15
  41.       ForeColor       =   -2147483640
  42.       BackColor       =   12632256
  43.       Begin VB.ComboBox cmb_Function 
  44.          Height          =   315
  45.          Left            =   1365
  46.          TabIndex        =   1
  47.          Top             =   90
  48.          Width           =   5100
  49.       End
  50.       Begin Threed.SSCommand cmdNP 
  51.          Height          =   300
  52.          Index           =   1
  53.          Left            =   7455
  54.          TabIndex        =   10
  55.          Top             =   90
  56.          Width           =   255
  57.          _Version        =   65536
  58.          _ExtentX        =   450
  59.          _ExtentY        =   529
  60.          _StockProps     =   78
  61.          Caption         =   ">"
  62.          BevelWidth      =   1
  63.          Font3D          =   3
  64.          RoundedCorners  =   0   'False
  65.          Outline         =   0   'False
  66.       End
  67.       Begin Threed.SSCommand cmdNP 
  68.          Height          =   300
  69.          Index           =   0
  70.          Left            =   6615
  71.          TabIndex        =   9
  72.          Top             =   90
  73.          Width           =   255
  74.          _Version        =   65536
  75.          _ExtentX        =   450
  76.          _ExtentY        =   529
  77.          _StockProps     =   78
  78.          Caption         =   "<"
  79.          BevelWidth      =   1
  80.          Font3D          =   3
  81.          RoundedCorners  =   0   'False
  82.          Outline         =   0   'False
  83.       End
  84.       Begin VB.Label Label2 
  85.          Caption         =   "&Select a function"
  86.          Height          =   255
  87.          Left            =   90
  88.          TabIndex        =   3
  89.          Top             =   120
  90.          Width           =   1275
  91.       End
  92.       Begin Threed.SSCommand SSCommand1 
  93.          Default         =   -1  'True
  94.          Height          =   300
  95.          Left            =   6930
  96.          TabIndex        =   2
  97.          Top             =   90
  98.          Width           =   465
  99.          _Version        =   65536
  100.          _ExtentX        =   820
  101.          _ExtentY        =   529
  102.          _StockProps     =   78
  103.          Caption         =   "&Go"
  104.          BevelWidth      =   1
  105.          RoundedCorners  =   0   'False
  106.          Outline         =   0   'False
  107.       End
  108.    End
  109.    Begin Threed.SSPanel SSPanel2 
  110.       Align           =   2  'Align Bottom
  111.       Height          =   465
  112.       Left            =   0
  113.       TabIndex        =   4
  114.       Top             =   4770
  115.       Width           =   7785
  116.       _Version        =   65536
  117.       _ExtentX        =   13732
  118.       _ExtentY        =   820
  119.       _StockProps     =   15
  120.       BackColor       =   12632256
  121.       Begin VB.TextBox Text1 
  122.          Height          =   285
  123.          Left            =   1440
  124.          TabIndex        =   6
  125.          Tag             =   "A/BC/DEF/GHIJ/KLMNOP/"
  126.          Top             =   90
  127.          Width           =   5370
  128.       End
  129.       Begin Threed.SSCommand SSCommand2 
  130.          Height          =   285
  131.          Left            =   6885
  132.          TabIndex        =   7
  133.          Top             =   90
  134.          Width           =   825
  135.          _Version        =   65536
  136.          _ExtentX        =   1455
  137.          _ExtentY        =   503
  138.          _StockProps     =   78
  139.          Caption         =   "&Reset"
  140.          BevelWidth      =   1
  141.          Outline         =   0   'False
  142.       End
  143.       Begin VB.Label Label1 
  144.          Caption         =   "&Enter a test string"
  145.          Height          =   255
  146.          Left            =   90
  147.          TabIndex        =   5
  148.          Top             =   120
  149.          Width           =   1275
  150.       End
  151.    End
  152. End
  153. Attribute VB_Name = "frmString"
  154. Attribute VB_Creatable = False
  155. Attribute VB_Exposed = False
  156. Option Explicit
  157. Option Base 1
  158.  
  159. Private Const Iteration = 250
  160.  
  161. Dim IsLoaded         As Integer
  162.  
  163. Dim TimerStartOk     As Single
  164.  
  165. Private Sub cmdNP_Click(Index As Integer)
  166.  
  167.    Call sub_NextPrev(cmb_Function, Index)
  168.  
  169. End Sub
  170.  
  171.  
  172. Private Sub cmb_Function_Click()
  173.    
  174.    If (IsLoaded = False) Then Exit Sub
  175.    
  176.    mdiMCSTR.Picture1.Visible = True
  177.    mdiMCSTR.Enabled = False
  178.    
  179.    SSPanel2.Visible = True
  180.    
  181.    txt_Result = ""
  182.    
  183.    DoEvents
  184.    
  185.    Select Case cmb_Function.ListIndex
  186.       Case 0
  187.          Call TestOneCharFromLeft
  188.       Case 1
  189.          Call TestOneCharFromRight
  190.       Case 2
  191.          Call TestBlockCharFromLeft
  192.       Case 3
  193.          Call TestBlockCharFromRight
  194.       Case 4
  195.          Call TestGetIn
  196.       Case 5
  197.          Call TestGetInR
  198.       Case 6
  199.          Call TestGetInPart
  200.       Case 7
  201.          Call TestGetInPartR
  202.       Case 8
  203.          Call TestGetBlock
  204.       Case 9
  205.          Call TestInsertChars
  206.       Case 10
  207.          Call TestInsertByMask
  208.       Case 11
  209.          Call TestInsertBlocks
  210.       Case 12
  211.          Call TestInsertBlocksBy
  212.       Case 13
  213.          Call TestRemoveOneChar
  214.       Case 14
  215.          Call TestRemoveBlockChar
  216.       Case 15
  217.          Call TestTokenIn
  218.       Case 16
  219.          SSPanel2.Visible = False
  220.          Call TestOrTokenX
  221.       Case 17
  222.          SSPanel2.Visible = False
  223.          Call TestAndTokenX
  224.       Case 18
  225.          Call TestReverse
  226.       Case 19
  227.          Call TestMixChars
  228.       Case 20
  229.          Call TestScrollX
  230.       Case 21
  231.          Call TestChangeChars
  232.       Case 22
  233.          Call TestChangeCharsUntil
  234.       Case 23
  235.          Call TestCheckChars
  236.       Case 24
  237.          Call TestFilterChars
  238.       Case 25
  239.          Call TestFilterNotChars
  240.       Case 26
  241.          Call TestFilterBlocks
  242.       Case 27
  243.          Call TestResizeString
  244.       Case 28
  245.          Call TestResizeStringAndFill
  246.       Case 29
  247.          Call TestCreateAndFill
  248.       Case 30
  249.          Call TestFill
  250.       Case 31
  251.          Call TestLrc
  252.       Case 32
  253.          Call TestCompress
  254.       Case 33
  255.          SSPanel2.Visible = False
  256.          Call TestCompressTab
  257.       Case 34
  258.          Call TestCompact
  259.       Case 35
  260.          Call TestAlign
  261.       Case 36
  262.          Call TestProperName
  263.       Case 37
  264.          Call TestProperName2
  265.       Case 38
  266.          Call TestStringSAR
  267.       Case 39
  268.          Call TestToHexa
  269.       Case 40
  270.          SSPanel2.Visible = False
  271.          Call TestRomanArabic
  272.       Case 41
  273.          Call TestAsciiEbcdic
  274.       Case 42
  275.          SSPanel2.Visible = False
  276.          Call TestPatternMatch
  277.       Case 43
  278.          SSPanel2.Visible = False
  279.          Call TestPatternExtMatch
  280.       Case 44
  281.          Call TestCheckNumericity
  282.       Case 45
  283.          Call TestAlphaDigit
  284.       Case 46
  285.          SSPanel2.Visible = False
  286.          Call TestH2X
  287.       Case 47
  288.          Call TestMorse
  289.    End Select
  290.  
  291.    DoEvents
  292.    
  293.    mdiMCSTR.Enabled = True
  294.    mdiMCSTR.Picture1.Visible = False
  295.    
  296. End Sub
  297.  
  298.  
  299.  
  300. Private Sub Form_Activate()
  301.  
  302.    mdiMCSTR.Label2.Caption = cInsertBlocks(mdiMCSTR.Label2.Tag, "" & Iteration)
  303.  
  304. End Sub
  305.  
  306. Private Sub Form_Load()
  307.  
  308.    IsLoaded = False
  309.    
  310.    Show
  311.  
  312.    Text1.Text = Text1.Tag + Left$(LCase$(Text1.Tag), Len(Text1.Tag) - 1)
  313.  
  314.    Call sub_Load_Combo(cmb_Function, T2WDirInst + "_string.t2w")
  315.    
  316.    IsLoaded = True
  317.    
  318. End Sub
  319.  
  320. Private Sub SSCommand1_Click()
  321.    
  322.    Call cmb_Function_Click
  323.    
  324. End Sub
  325.  
  326.  
  327.  
  328.  
  329. Private Sub TestOneCharFromLeft()
  330.    
  331.    Dim intResult        As Integer
  332.    Dim strResult        As String
  333.    Dim strDisplay       As String
  334.    
  335.    Dim i                As Integer
  336.    
  337.    Dim Str1             As String
  338.    
  339.    intResult = 0
  340.    
  341.    strResult = ""
  342.    strDisplay = ""
  343.      
  344.    Str1 = Text1.Text
  345.    
  346.    strDisplay = strDisplay & "The 3,7,1,21,14 chars from left of '" & Str1 & "' are " & vbCrLf & vbCrLf
  347.  
  348.    strDisplay = strDisplay & "03: '" & cOneCharFromLeft(Str1, 3) & "'" & vbCrLf
  349.    strDisplay = strDisplay & "07: '" & cOneCharFromLeft(Str1, 7) & "'" & vbCrLf
  350.    strDisplay = strDisplay & "01: '" & cOneCharFromLeft(Str1, 1) & "'" & vbCrLf
  351.    strDisplay = strDisplay & "21: '" & cOneCharFromLeft(Str1, 21) & "'" & vbCrLf
  352.    strDisplay = strDisplay & "14: '" & cOneCharFromLeft(Str1, 14) & "'" & vbCrLf
  353.    
  354.    txt_Result = strDisplay
  355.  
  356.    'time the function
  357.  
  358.    TimerStartOk = Timer
  359.    
  360.    For i = 1 To Iteration
  361.       strResult = cOneCharFromLeft(Str1, 3)
  362.    Next i
  363.    
  364.    mdiMCSTR.pnl_Timer = Int((Timer - TimerStartOk) * 1000)
  365.    
  366.  
  367. End Sub
  368.  
  369. Private Sub SSCommand2_Click()
  370.    
  371.    Text1.Text = Text1.Tag + Left$(LCase$(Text1.Tag), Len(Text1.Tag) - 1)
  372.    
  373.    Call SSCommand1_Click
  374.    
  375. End Sub
  376.  
  377.  
  378.  
  379.  
  380.  
  381. Private Sub TestOneCharFromRight()
  382.    
  383.    Dim intResult        As Integer
  384.    Dim strResult        As String
  385.    Dim strDisplay       As String
  386.    
  387.    Dim i                As Integer
  388.    
  389.    Dim Str1             As String
  390.    
  391.    intResult = 0
  392.    
  393.    strResult = ""
  394.    strDisplay = ""
  395.      
  396.    Str1 = Text1.Text
  397.    
  398.    strDisplay = strDisplay & "The 3,7,1,21,14 chars from right of '" & Str1 & "' are " & vbCrLf & vbCrLf
  399.  
  400.    strDisplay = strDisplay & "03: '" & cOneCharFromRight(Str1, 3) & "'" & vbCrLf
  401.    strDisplay = strDisplay & "07: '" & cOneCharFromRight(Str1, 7) & "'" & vbCrLf
  402.    strDisplay = strDisplay & "01: '" & cOneCharFromRight(Str1, 1) & "'" & vbCrLf
  403.    strDisplay = strDisplay & "21: '" & cOneCharFromRight(Str1, 21) & "'" & vbCrLf
  404.    strDisplay = strDisplay & "14: '" & cOneCharFromRight(Str1, 14) & "'" & vbCrLf
  405.    
  406.    txt_Result = strDisplay
  407.  
  408.    'time the function
  409.  
  410.    TimerStartOk = Timer
  411.    
  412.    For i = 1 To Iteration
  413.       strResult = cOneCharFromRight(Str1, 3)
  414.    Next i
  415.    
  416.    mdiMCSTR.pnl_Timer = Int((Timer - TimerStartOk) * 1000)
  417.    
  418.  
  419. End Sub
  420.  
  421. Private Sub TestBlockCharFromLeft()
  422.    
  423.    Dim intResult        As Integer
  424.    Dim strResult        As String
  425.    Dim strDisplay       As String
  426.    
  427.    Dim i                As Integer
  428.    
  429.    Dim Str1             As String
  430.    
  431.    intResult = 0
  432.    
  433.    strResult = ""
  434.    strDisplay = ""
  435.      
  436.    Str1 = Text1.Text
  437.    
  438.    strDisplay = strDisplay & "The 3,7,1,21,14 blocks from left of '" & Str1 & "' are " & vbCrLf & vbCrLf
  439.  
  440.    strDisplay = strDisplay & "03: '" & cBlockCharFromLeft(Str1, 3) & "'" & vbCrLf
  441.    strDisplay = strDisplay & "07: '" & cBlockCharFromLeft(Str1, 7) & "'" & vbCrLf
  442.    strDisplay = strDisplay & "01: '" & cBlockCharFromLeft(Str1, 1) & "'" & vbCrLf
  443.    strDisplay = strDisplay & "21: '" & cBlockCharFromLeft(Str1, 21) & "'" & vbCrLf
  444.    strDisplay = strDisplay & "14: '" & cBlockCharFromLeft(Str1, 14) & "'" & vbCrLf
  445.    
  446.    txt_Result = strDisplay
  447.  
  448.    'time the function
  449.  
  450.    TimerStartOk = Timer
  451.    
  452.    For i = 1 To Iteration
  453.       strResult = cBlockCharFromLeft(Str1, 3)
  454.    Next i
  455.    
  456.    mdiMCSTR.pnl_Timer = Int((Timer - TimerStartOk) * 1000)
  457.    
  458.  
  459. End Sub
  460.  
  461. Private Sub TestBlockCharFromRight()
  462.    
  463.    Dim intResult        As Integer
  464.    Dim strResult        As String
  465.    Dim strDisplay       As String
  466.    
  467.    Dim i                As Integer
  468.    
  469.    Dim Str1             As String
  470.    
  471.    intResult = 0
  472.    
  473.    strResult = ""
  474.    strDisplay = ""
  475.      
  476.    Str1 = Text1.Text
  477.    
  478.    strDisplay = strDisplay & "The 3,7,1,21,14 blocks from right of '" & Str1 & "' are " & vbCrLf & vbCrLf
  479.  
  480.    strDisplay = strDisplay & "03: '" & cBlockCharFromRight(Str1, 3) & "'" & vbCrLf
  481.    strDisplay = strDisplay & "07: '" & cBlockCharFromRight(Str1, 7) & "'" & vbCrLf
  482.    strDisplay = strDisplay & "01: '" & cBlockCharFromRight(Str1, 1) & "'" & vbCrLf
  483.    strDisplay = strDisplay & "21: '" & cBlockCharFromRight(Str1, 21) & "'" & vbCrLf
  484.    strDisplay = strDisplay & "14: '" & cBlockCharFromRight(Str1, 14) & "'" & vbCrLf
  485.    
  486.    txt_Result = strDisplay
  487.  
  488.    'time the function
  489.  
  490.    TimerStartOk = Timer
  491.    
  492.    For i = 1 To Iteration
  493.       strResult = cBlockCharFromRight(Str1, 3)
  494.    Next i
  495.    
  496.    mdiMCSTR.pnl_Timer = Int((Timer - TimerStartOk) * 1000)
  497.    
  498.  
  499. End Sub
  500.  
  501. Private Sub TestGetIn()
  502.    
  503.    Dim intResult        As Integer
  504.    Dim strResult        As String
  505.    Dim strDisplay       As String
  506.    
  507.    Dim i                As Integer
  508.    
  509.    Dim Str1             As String
  510.    Dim Sep1             As String
  511.    
  512.    intResult = 0
  513.    
  514.    strResult = ""
  515.    strDisplay = ""
  516.      
  517.    Str1 = Text1.Text
  518.    
  519.    Sep1 = "/"
  520.    
  521.    strDisplay = strDisplay & "The 3,7,1,5,2,0 blocks of '" & Str1 & "' (separator '" & Sep1 & "') are " & vbCrLf & vbCrLf
  522.  
  523.    strDisplay = strDisplay & "3: '" & cGetIn(Str1, Sep1, 3) & "'" & vbCrLf
  524.    strDisplay = strDisplay & "7: '" & cGetIn(Str1, Sep1, 7) & "'" & vbCrLf
  525.    strDisplay = strDisplay & "1: '" & cGetIn(Str1, Sep1, 1) & "'" & vbCrLf
  526.    strDisplay = strDisplay & "5: '" & cGetIn(Str1, Sep1, 5) & "'" & vbCrLf
  527.    strDisplay = strDisplay & "2: '" & cGetIn(Str1, Sep1, 2) & "'" & vbCrLf
  528.    strDisplay = strDisplay & "0: '" & cGetIn(Str1, Sep1, 0) & "'" & vbCrLf & vbCrLf
  529.    
  530.    Sep1 = "G"
  531.    
  532.    strDisplay = strDisplay & "The 1,2 blocks of '" & Str1 & "' (separator '" & Sep1 & "') are " & vbCrLf & vbCrLf
  533.  
  534.    strDisplay = strDisplay & "1: '" & cGetIn(Str1, Sep1, 1) & "'" & vbCrLf
  535.    strDisplay = strDisplay & "2: '" & cGetIn(Str1, Sep1, 2) & "'" & vbCrLf & vbCrLf
  536.    
  537.    Sep1 = "g"
  538.    
  539.    strDisplay = strDisplay & "The 2,1 blocks of '" & Str1 & "' (separator '" & Sep1 & "') are " & vbCrLf & vbCrLf
  540.  
  541.    strDisplay = strDisplay & "2: '" & cGetIn(Str1, Sep1, 2) & "'" & vbCrLf
  542.    strDisplay = strDisplay & "1: '" & cGetIn(Str1, Sep1, 1) & "'"
  543.    
  544.    txt_Result = strDisplay
  545.  
  546.    'time the function
  547.  
  548.    TimerStartOk = Timer
  549.    
  550.    For i = 1 To Iteration
  551.       strResult = cGetIn(Str1, Sep1, 3)
  552.    Next i
  553.    
  554.    mdiMCSTR.pnl_Timer = Int((Timer - TimerStartOk) * 1000)
  555.    
  556.  
  557. End Sub
  558.  
  559. Private Sub TestGetInR()
  560.    
  561.    Dim intResult        As Integer
  562.    Dim strResult        As String
  563.    Dim strDisplay       As String
  564.    
  565.    Dim i                As Integer
  566.    
  567.    Dim Str1             As String
  568.    Dim Sep1             As String
  569.    
  570.    intResult = 0
  571.    
  572.    strResult = ""
  573.    strDisplay = ""
  574.      
  575.    Str1 = Text1.Text
  576.    
  577.    Sep1 = "/"
  578.    
  579.    strDisplay = strDisplay & "The 3,7,1,5,2,0 blocks of '" & Str1 & "' (separator '" & Sep1 & "') are " & vbCrLf & vbCrLf
  580.  
  581.    strDisplay = strDisplay & "3: '" & cGetInR(Str1, Sep1, 3) & "'" & vbCrLf
  582.    strDisplay = strDisplay & "7: '" & cGetInR(Str1, Sep1, 7) & "'" & vbCrLf
  583.    strDisplay = strDisplay & "1: '" & cGetInR(Str1, Sep1, 1) & "'" & vbCrLf
  584.    strDisplay = strDisplay & "5: '" & cGetInR(Str1, Sep1, 5) & "'" & vbCrLf
  585.    strDisplay = strDisplay & "2: '" & cGetInR(Str1, Sep1, 2) & "'" & vbCrLf
  586.    strDisplay = strDisplay & "0: '" & cGetInR(Str1, Sep1, 0) & "'" & vbCrLf & vbCrLf
  587.    
  588.    Sep1 = "G"
  589.    
  590.    strDisplay = strDisplay & "The 1,2 blocks of '" & Str1 & "' (separator '" & Sep1 & "') are " & vbCrLf & vbCrLf
  591.  
  592.    strDisplay = strDisplay & "1: '" & cGetInR(Str1, Sep1, 1) & "'" & vbCrLf
  593.    strDisplay = strDisplay & "2: '" & cGetInR(Str1, Sep1, 2) & "'" & vbCrLf & vbCrLf
  594.    
  595.    Sep1 = "g"
  596.    
  597.    strDisplay = strDisplay & "The 2,1 blocks of '" & Str1 & "' (separator '" & Sep1 & "') are " & vbCrLf & vbCrLf
  598.  
  599.    strDisplay = strDisplay & "2: '" & cGetInR(Str1, Sep1, 2) & "'" & vbCrLf
  600.    strDisplay = strDisplay & "1: '" & cGetInR(Str1, Sep1, 1) & "'"
  601.    
  602.    txt_Result = strDisplay
  603.  
  604.    'time the function
  605.  
  606.    TimerStartOk = Timer
  607.    
  608.    For i = 1 To Iteration
  609.       strResult = cGetInR(Str1, Sep1, 3)
  610.    Next i
  611.    
  612.    mdiMCSTR.pnl_Timer = Int((Timer - TimerStartOk) * 1000)
  613.    
  614.  
  615. End Sub
  616.  
  617. Private Sub TestGetInPart()
  618.    
  619.    Dim intResult        As Integer
  620.    Dim strResult        As String
  621.    Dim strDisplay       As String
  622.    
  623.    Dim i                As Integer
  624.    
  625.    Dim Str1             As String
  626.    Dim Sep1             As String
  627.    
  628.    intResult = 0
  629.    
  630.    strResult = ""
  631.    strDisplay = ""
  632.      
  633.    Str1 = Text1.Text
  634.    
  635.    Sep1 = "/"
  636.    
  637.    strDisplay = strDisplay & "The first and the second part from the left of '" & Str1 & "' (separator '" & Sep1 & "') are " & vbCrLf & vbCrLf
  638.  
  639.    strDisplay = strDisplay & "First: '" & cGetInPart(Str1, Sep1, True) & "'" & vbCrLf
  640.    strDisplay = strDisplay & "Second: '" & cGetInPart(Str1, Sep1, False) & "'" & vbCrLf & vbCrLf
  641.    
  642.    Sep1 = "G"
  643.    
  644.    strDisplay = strDisplay & "The first and the second part from the left of '" & Str1 & "' (separator '" & Sep1 & "') are " & vbCrLf & vbCrLf
  645.  
  646.    strDisplay = strDisplay & "First: '" & cGetInPart(Str1, Sep1, True) & "'" & vbCrLf
  647.    strDisplay = strDisplay & "Second: '" & cGetInPart(Str1, Sep1, False) & "'" & vbCrLf & vbCrLf
  648.    
  649.    Sep1 = "g"
  650.    
  651.    strDisplay = strDisplay & "The first and the second part from the left of '" & Str1 & "' (separator '" & Sep1 & "') are " & vbCrLf & vbCrLf
  652.  
  653.    strDisplay = strDisplay & "First: '" & cGetInPart(Str1, Sep1, True) & "'" & vbCrLf
  654.    strDisplay = strDisplay & "Second: '" & cGetInPart(Str1, Sep1, False) & "'"
  655.    
  656.    txt_Result = strDisplay
  657.  
  658.    'time the function
  659.  
  660.    TimerStartOk = Timer
  661.    
  662.    For i = 1 To Iteration
  663.       strResult = cGetInPart(Str1, Sep1, True)
  664.    Next i
  665.    
  666.    mdiMCSTR.pnl_Timer = Int((Timer - TimerStartOk) * 1000)
  667.    
  668.  
  669. End Sub
  670.  
  671. Private Sub TestGetInPartR()
  672.    
  673.    Dim intResult        As Integer
  674.    Dim strResult        As String
  675.    Dim strDisplay       As String
  676.    
  677.    Dim i                As Integer
  678.    
  679.    Dim Str1             As String
  680.    Dim Sep1             As String
  681.    
  682.    intResult = 0
  683.    
  684.    strResult = ""
  685.    strDisplay = ""
  686.      
  687.    Str1 = Text1.Text
  688.    
  689.    Sep1 = "/"
  690.    
  691.    strDisplay = strDisplay & "The first and the second part from the left of '" & Str1 & "' (separator '" & Sep1 & "') are " & vbCrLf & vbCrLf
  692.  
  693.    strDisplay = strDisplay & "First: '" & cGetInPartR(Str1, Sep1, True) & "'" & vbCrLf
  694.    strDisplay = strDisplay & "Second: '" & cGetInPartR(Str1, Sep1, False) & "'" & vbCrLf & vbCrLf
  695.    
  696.    Sep1 = "G"
  697.    
  698.    strDisplay = strDisplay & "The first and the second part from the left of '" & Str1 & "' (separator '" & Sep1 & "') are " & vbCrLf & vbCrLf
  699.  
  700.    strDisplay = strDisplay & "First: '" & cGetInPartR(Str1, Sep1, True) & "'" & vbCrLf
  701.    strDisplay = strDisplay & "Second: '" & cGetInPartR(Str1, Sep1, False) & "'" & vbCrLf & vbCrLf
  702.    
  703.    Sep1 = "g"
  704.    
  705.    strDisplay = strDisplay & "The first and the second part from the left of '" & Str1 & "' (separator '" & Sep1 & "') are " & vbCrLf & vbCrLf
  706.  
  707.    strDisplay = strDisplay & "First: '" & cGetInPartR(Str1, Sep1, True) & "'" & vbCrLf
  708.    strDisplay = strDisplay & "Second: '" & cGetInPartR(Str1, Sep1, False) & "'"
  709.    
  710.    txt_Result = strDisplay
  711.  
  712.    'time the function
  713.  
  714.    TimerStartOk = Timer
  715.    
  716.    For i = 1 To Iteration
  717.       strResult = cGetInPartR(Str1, Sep1, True)
  718.    Next i
  719.    
  720.    mdiMCSTR.pnl_Timer = Int((Timer - TimerStartOk) * 1000)
  721.    
  722.  
  723. End Sub
  724.  
  725. Private Sub TestGetBlock()
  726.    
  727.    Dim intResult        As Integer
  728.    Dim strResult        As String
  729.    Dim strDisplay       As String
  730.    
  731.    Dim i                As Integer
  732.    
  733.    Dim Str1             As String
  734.    Dim BlockSize        As Integer
  735.    
  736.    intResult = 0
  737.    
  738.    strResult = ""
  739.    strDisplay = ""
  740.      
  741.    Str1 = Text1.Text
  742.    
  743.    BlockSize = 2
  744.    
  745.    strDisplay = strDisplay & "The 3,7,1,5,2,0 blocks of '" & Str1 & "' (block size '" & BlockSize & "') are " & vbCrLf & vbCrLf
  746.  
  747.    strDisplay = strDisplay & "3: '" & cGetBlock(Str1, 3, BlockSize) & "'" & vbCrLf
  748.    strDisplay = strDisplay & "7: '" & cGetBlock(Str1, 7, BlockSize) & "'" & vbCrLf
  749.    strDisplay = strDisplay & "1: '" & cGetBlock(Str1, 1, BlockSize) & "'" & vbCrLf
  750.    strDisplay = strDisplay & "5: '" & cGetBlock(Str1, 5, BlockSize) & "'" & vbCrLf
  751.    strDisplay = strDisplay & "2: '" & cGetBlock(Str1, 2, BlockSize) & "'" & vbCrLf
  752.    strDisplay = strDisplay & "0: '" & cGetBlock(Str1, 0, BlockSize) & "'" & vbCrLf & vbCrLf
  753.    
  754.    BlockSize = 3
  755.    
  756.    strDisplay = strDisplay & "The 1,2 blocks of '" & Str1 & "' (block size '" & BlockSize & "') are " & vbCrLf & vbCrLf
  757.  
  758.    strDisplay = strDisplay & "1: '" & cGetBlock(Str1, 1, BlockSize) & "'" & vbCrLf
  759.    strDisplay = strDisplay & "2: '" & cGetBlock(Str1, 2, BlockSize) & "'" & vbCrLf & vbCrLf
  760.    
  761.    BlockSize = 4
  762.    
  763.    strDisplay = strDisplay & "The 2,1 blocks of '" & Str1 & "' (block size '" & BlockSize & "') are " & vbCrLf & vbCrLf
  764.  
  765.    strDisplay = strDisplay & "2: '" & cGetBlock(Str1, 2, BlockSize) & "'" & vbCrLf
  766.    strDisplay = strDisplay & "1: '" & cGetBlock(Str1, 1, BlockSize) & "'"
  767.    
  768.    txt_Result = strDisplay
  769.  
  770.    'time the function
  771.  
  772.    TimerStartOk = Timer
  773.    
  774.    For i = 1 To Iteration
  775.       strResult = cGetBlock(Str1, BlockSize, 3)
  776.    Next i
  777.    
  778.    mdiMCSTR.pnl_Timer = Int((Timer - TimerStartOk) * 1000)
  779.    
  780.  
  781. End Sub
  782.  
  783. Private Sub TestInsertChars()
  784.    
  785.    Dim intResult        As Integer
  786.    Dim strResult        As String
  787.    Dim strDisplay       As String
  788.    
  789.    Dim i                As Integer
  790.    
  791.    Dim Str1             As String
  792.   
  793.    intResult = 0
  794.    
  795.    strResult = ""
  796.    strDisplay = ""
  797.      
  798.    Str1 = Text1.Text
  799.    
  800.    strDisplay = strDisplay & "Insert 'a' from 7 char into '" & Str1 & "' is " & vbCrLf & vbCrLf
  801.    strDisplay = strDisplay & cInsertChars(Str1, 7, "a") & vbCrLf & vbCrLf
  802.  
  803.    strDisplay = strDisplay & "Insert '10$' from 2 char into '" & Str1 & "' is " & vbCrLf & vbCrLf
  804.    strDisplay = strDisplay & cInsertChars(Str1, 2, "10$") & vbCrLf & vbCrLf
  805.  
  806.    strDisplay = strDisplay & "Insert '@' from 21 char into '" & Str1 & "' is " & vbCrLf & vbCrLf
  807.    strDisplay = strDisplay & cInsertChars(Str1, 21, "@") & vbCrLf & vbCrLf
  808.  
  809.    txt_Result = strDisplay
  810.  
  811.    'time the function
  812.  
  813.    TimerStartOk = Timer
  814.    
  815.    For i = 1 To Iteration
  816.       strResult = cInsertChars(Str1, 1, "a")
  817.    Next i
  818.    
  819.    mdiMCSTR.pnl_Timer = Int((Timer - TimerStartOk) * 1000)
  820.    
  821.  
  822. End Sub
  823.  
  824. Private Sub TestInsertByMask()
  825.    
  826.    Dim intResult        As Integer
  827.    Dim strResult        As String
  828.    Dim strDisplay       As String
  829.    
  830.    Dim i                As Integer
  831.    
  832.    Dim Str1             As String
  833.    Dim Str2             As String
  834.    Dim Mask1            As String
  835.   
  836.    intResult = 0
  837.    
  838.    strResult = ""
  839.    strDisplay = ""
  840.      
  841.    Str1 = "Nr ## Price $###.##"
  842.    Str2 = "0705200"
  843.    Mask1 = "#"
  844.    
  845.    strDisplay = strDisplay & "Insert '" & Str2 & "' into '" & Str1 & "' is " & vbCrLf & vbCrLf
  846.    strDisplay = strDisplay & cInsertByMask(Str1, Mask1, Str2) & vbCrLf & vbCrLf
  847.  
  848.    Str1 = Text1.Text
  849.    Str2 = String(cCount(Str1, "/"), "*")
  850.    Mask1 = "/"
  851.    
  852.    strDisplay = strDisplay & "Insert '" & Str2 & "' into '" & Str1 & "' is " & vbCrLf & vbCrLf
  853.    strDisplay = strDisplay & cInsertByMask(Str1, Mask1, Str2) & vbCrLf & vbCrLf
  854.  
  855.    txt_Result = strDisplay
  856.  
  857.    'time the function
  858.  
  859.    TimerStartOk = Timer
  860.    
  861.    For i = 1 To Iteration
  862.       strResult = cInsertByMask(Str1, Mask1, Str2)
  863.    Next i
  864.    
  865.    mdiMCSTR.pnl_Timer = Int((Timer - TimerStartOk) * 1000)
  866.    
  867.  
  868. End Sub
  869.  
  870. Private Sub TestInsertBlocks()
  871.    
  872.    Dim intResult        As Integer
  873.    Dim strResult        As String
  874.    Dim strDisplay       As String
  875.    
  876.    Dim i                As Integer
  877.    
  878.    Dim Str1             As String
  879.    Dim Str2             As String
  880.   
  881.    intResult = 0
  882.    
  883.    strResult = ""
  884.    strDisplay = ""
  885.      
  886.    Str1 = "A~BC~DEF~GHIJ~"
  887.    Str2 = "a~bc~def~ghij"
  888.    
  889.    strDisplay = strDisplay + "Insert '" & Str2 & "' into '" & Str1 & "' is " & vbCrLf & vbCrLf
  890.    strDisplay = strDisplay & cInsertBlocks(Str1, Str2) & vbCrLf & vbCrLf
  891.  
  892.    Str1 = "A~BC~DEF~GHIJ~"
  893.    Str2 = ""
  894.    
  895.    strDisplay = strDisplay + "Insert '' into '" & Str1 & "' is " & vbCrLf & vbCrLf
  896.    strDisplay = strDisplay & cInsertBlocks(Str1, Str2) & vbCrLf & vbCrLf
  897.  
  898.    txt_Result = strDisplay
  899.  
  900.    'time the function
  901.  
  902.    TimerStartOk = Timer
  903.    
  904.    For i = 1 To Iteration
  905.       strResult = cInsertBlocks(Str1, Str2)
  906.    Next i
  907.    
  908.    mdiMCSTR.pnl_Timer = Int((Timer - TimerStartOk) * 1000)
  909.    
  910.  
  911. End Sub
  912.  
  913. Public Sub TestInsertBlocksBy()
  914.    
  915.    Dim intResult        As Integer
  916.    Dim strResult        As String
  917.    Dim strDisplay       As String
  918.    
  919.    Dim i                As Integer
  920.    
  921.    Dim Str1             As String
  922.    Dim Str2             As String
  923.    Dim Sep1             As String
  924.   
  925.    intResult = 0
  926.    
  927.    strResult = ""
  928.    strDisplay = ""
  929.      
  930.    Str1 = Text1.Text
  931.    Str2 = "a/bc/def/ghij"
  932.    Sep1 = "/"
  933.    
  934.    strDisplay = strDisplay + "Insert '" & Str2 & "' into '" & Str1 & "' is " & vbCrLf & vbCrLf
  935.    strDisplay = strDisplay & cInsertBlocksBy(Str1, Str2, Sep1) & vbCrLf & vbCrLf
  936.  
  937.    Str1 = Text1.Text
  938.    Str2 = ""
  939.    
  940.    strDisplay = strDisplay + "Insert '' into '" & Str1 & "' is " & vbCrLf & vbCrLf
  941.    strDisplay = strDisplay & cInsertBlocksBy(Str1, Str2, Sep1) & vbCrLf & vbCrLf
  942.  
  943.    txt_Result = strDisplay
  944.  
  945.    'time the function
  946.  
  947.    TimerStartOk = Timer
  948.    
  949.    For i = 1 To Iteration
  950.       strResult = cInsertBlocksBy(Str1, Str2, Sep1)
  951.    Next i
  952.    
  953.    mdiMCSTR.pnl_Timer = Int((Timer - TimerStartOk) * 1000)
  954.    
  955.  
  956. End Sub
  957.  
  958. Private Sub TestRemoveOneChar()
  959.    
  960.    Dim intResult        As Integer
  961.    Dim strResult        As String
  962.    Dim strDisplay       As String
  963.    
  964.    Dim i                As Integer
  965.    
  966.    Dim Str1             As String
  967.    
  968.    intResult = 0
  969.    
  970.    strResult = ""
  971.    strDisplay = ""
  972.      
  973.    Str1 = Text1.Text
  974.    strDisplay = strDisplay & "Removing the 7 char of '" & Str1 & "' is " & vbCrLf & vbCrLf
  975.    strDisplay = strDisplay & cRemoveOneChar(Str1, 7) & vbCrLf & vbCrLf
  976.    
  977.    Str1 = Text1.Text
  978.    strDisplay = strDisplay & "Removing the 21 char of '" & Str1 & "' is " & vbCrLf & vbCrLf
  979.    strDisplay = strDisplay & cRemoveOneChar(Str1, 21) & vbCrLf & vbCrLf
  980.    
  981.    Str1 = Text1.Text
  982.    strDisplay = strDisplay & "Removing the 14 char of '" & Str1 & "' is " & vbCrLf & vbCrLf
  983.    strDisplay = strDisplay & cRemoveOneChar(Str1, 14) & vbCrLf & vbCrLf
  984.    
  985.    Str1 = Text1.Text
  986.    strDisplay = strDisplay & "Removing the 0 char of '" & Str1 & "' is " & vbCrLf & vbCrLf
  987.    strDisplay = strDisplay & cRemoveOneChar(Str1, 0) & vbCrLf & vbCrLf
  988.    
  989.    Str1 = Text1.Text
  990.    strDisplay = strDisplay & "Removing the 1 char of '" & Str1 & "' is " & vbCrLf & vbCrLf
  991.    strDisplay = strDisplay & cRemoveOneChar(Str1, 1)
  992.    
  993.    txt_Result = strDisplay
  994.  
  995.    'time the function
  996.  
  997.    Str1 = Text1.Text
  998.    
  999.    TimerStartOk = Timer
  1000.    
  1001.    For i = 1 To Iteration
  1002.       strResult = cRemoveOneChar(Str1, 7)
  1003.    Next i
  1004.    
  1005.    mdiMCSTR.pnl_Timer = Int((Timer - TimerStartOk) * 1000)
  1006.    
  1007.  
  1008. End Sub
  1009.  
  1010. Public Sub TestRemoveBlockChar()
  1011.    
  1012.    Dim intResult        As Integer
  1013.    Dim strResult        As String
  1014.    Dim strDisplay       As String
  1015.    
  1016.    Dim i                As Integer
  1017.    
  1018.    Dim Str1             As String
  1019.    
  1020.    intResult = 0
  1021.    
  1022.    strResult = ""
  1023.    strDisplay = ""
  1024.      
  1025.    Str1 = Text1.Text
  1026.    strDisplay = strDisplay & "Removing 3 chars from the 7 char of '" & Str1 & "' is " & vbCrLf & vbCrLf
  1027.    strDisplay = strDisplay & cRemoveBlockChar(Str1, 7, 3) & vbCrLf & vbCrLf
  1028.    
  1029.    Str1 = Text1.Text
  1030.    strDisplay = strDisplay & "Removing 2 chars from the 21 char of '" & Str1 & "' is " & vbCrLf & vbCrLf
  1031.    strDisplay = strDisplay & cRemoveBlockChar(Str1, 21, 2) & vbCrLf & vbCrLf
  1032.    
  1033.    Str1 = Text1.Text
  1034.    strDisplay = strDisplay & "Removing 7 chars from the 14 char of '" & Str1 & "' is " & vbCrLf & vbCrLf
  1035.    strDisplay = strDisplay & cRemoveBlockChar(Str1, 14, 7) & vbCrLf & vbCrLf
  1036.    
  1037.    Str1 = Text1.Text
  1038.    strDisplay = strDisplay & "Removing 14 chars from the 0 char of '" & Str1 & "' is " & vbCrLf & vbCrLf
  1039.    strDisplay = strDisplay & cRemoveBlockChar(Str1, 0, 14) & vbCrLf & vbCrLf
  1040.    
  1041.    Str1 = Text1.Text
  1042.    strDisplay = strDisplay & "Removing 50 chars from the 1 char of '" & Str1 & "' is " & vbCrLf & vbCrLf
  1043.    strDisplay = strDisplay & cRemoveBlockChar(Str1, 1, 50)
  1044.    
  1045.    txt_Result = strDisplay
  1046.  
  1047.    'time the function
  1048.  
  1049.    Str1 = Text1.Text
  1050.  
  1051.    TimerStartOk = Timer
  1052.    
  1053.    For i = 1 To Iteration
  1054.       strResult = cRemoveBlockChar(Str1, 1, 1)
  1055.    Next i
  1056.    
  1057.    mdiMCSTR.pnl_Timer = Int((Timer - TimerStartOk) * 1000)
  1058.    
  1059.  
  1060. End Sub
  1061.  
  1062. Private Sub TestTokenIn()
  1063.    
  1064.    Dim intResult        As Integer
  1065.    Dim strResult        As String
  1066.    Dim strDisplay       As String
  1067.    
  1068.    Dim i                As Integer
  1069.    
  1070.    Dim Str1             As String
  1071.    Dim Sep1             As String
  1072.    
  1073.    intResult = 0
  1074.    
  1075.    strResult = ""
  1076.    strDisplay = ""
  1077.      
  1078.    Str1 = Text1.Text
  1079.    
  1080.    Sep1 = "/HM"
  1081.    
  1082.    strDisplay = strDisplay & "The 3,7,1,5,2,0 blocks of '" & Str1 & "' (separator '" & Sep1 & "') are " & vbCrLf & vbCrLf
  1083.  
  1084.    strDisplay = strDisplay & "3: '" & cTokenIn(Str1, Sep1, 3) & "'" & vbCrLf
  1085.    strDisplay = strDisplay & "7: '" & cTokenIn(Str1, Sep1, 7) & "'" & vbCrLf
  1086.    strDisplay = strDisplay & "1: '" & cTokenIn(Str1, Sep1, 1) & "'" & vbCrLf
  1087.    strDisplay = strDisplay & "5: '" & cTokenIn(Str1, Sep1, 5) & "'" & vbCrLf
  1088.    strDisplay = strDisplay & "2: '" & cTokenIn(Str1, Sep1, 2) & "'" & vbCrLf
  1089.    strDisplay = strDisplay & "0: '" & cTokenIn(Str1, Sep1, 0) & "'" & vbCrLf & vbCrLf
  1090.    
  1091.    Sep1 = "G"
  1092.    
  1093.    strDisplay = strDisplay & "The 1,2 blocks of '" & Str1 & "' (separator '" & Sep1 & "') are " & vbCrLf & vbCrLf
  1094.  
  1095.    strDisplay = strDisplay & "1: '" & cTokenIn(Str1, Sep1, 1) & "'" & vbCrLf
  1096.    strDisplay = strDisplay & "2: '" & cTokenIn(Str1, Sep1, 2) & "'" & vbCrLf & vbCrLf
  1097.    
  1098.    Sep1 = "g"
  1099.    
  1100.    strDisplay = strDisplay & "The 2,1 blocks of '" & Str1 & "' (separator '" & Sep1 & "') are " & vbCrLf & vbCrLf
  1101.  
  1102.    strDisplay = strDisplay & "2: '" & cTokenIn(Str1, Sep1, 2) & "'" & vbCrLf
  1103.    strDisplay = strDisplay & "1: '" & cTokenIn(Str1, Sep1, 1) & "'"
  1104.    
  1105.    txt_Result = strDisplay
  1106.  
  1107.    'time the function
  1108.  
  1109.    TimerStartOk = Timer
  1110.    
  1111.    For i = 1 To Iteration
  1112.       strResult = cTokenIn(Str1, Sep1, 3)
  1113.    Next i
  1114.    
  1115.    mdiMCSTR.pnl_Timer = Int((Timer - TimerStartOk) * 1000)
  1116.    
  1117.  
  1118. End Sub
  1119.  
  1120. Private Sub TestOrTokenX()
  1121.    
  1122.    Dim intResult        As Integer
  1123.    Dim strResult        As String
  1124.    Dim strDisplay       As String
  1125.    
  1126.    Dim i                As Integer
  1127.    
  1128.    Dim Str1             As String
  1129.    Dim Str2             As String
  1130.    Dim Sep1             As String
  1131.    
  1132.    intResult = 0
  1133.    
  1134.    strResult = ""
  1135.    strDisplay = ""
  1136.    
  1137.    Sep1 = "\"
  1138.      
  1139.    Str1 = "FOX|OVER|THE"
  1140.    Str2 = "THE QUICK BROWN FOX JUMPS OVER THE LAZY DOG"
  1141.    strDisplay = strDisplay & "One of token '" & Str1 & "' (|) in '" & Str2 & "' is " & IIf(cOrToken(Str2, Str1), "present", "not present") & vbCrLf & vbCrLf
  1142.    
  1143.    Str1 = "quick|jumps|the"
  1144.    Str2 = "THE QUICK BROWN FOX JUMPS OVER THE LAZY DOG"
  1145.    strDisplay = strDisplay & "One of token '" & Str1 & "' (|) in '" & Str2 & "' is " & IIf(cOrToken(Str2, Str1), "present", "not present") & vbCrLf & vbCrLf
  1146.  
  1147.    Str1 = "FOX\OVER\THE"
  1148.    Str2 = "THE QUICK BROWN FOX JUMPS OVER THE LAZY DOG"
  1149.    strDisplay = strDisplay & "One of token '" & Str1 & "' (\) in '" & Str2 & "' is " & IIf(cOrTokenIn(Str2, Str1, Sep1), "present", "not present") & vbCrLf & vbCrLf
  1150.    
  1151.    Str1 = "quick\jumps\the"
  1152.    Str2 = "THE QUICK BROWN FOX JUMPS OVER THE LAZY DOG"
  1153.    strDisplay = strDisplay & "One of token '" & Str1 & "' (\) in '" & Str2 & "' is " & IIf(cOrTokenIn(Str2, Str1, Sep1), "present", "not present") & vbCrLf & vbCrLf
  1154.  
  1155.    Str1 = "FOX/OVER/THE"
  1156.    Str2 = "THE QUICK BROWN FOX JUMPS OVER THE LAZY DOG"
  1157.    strDisplay = strDisplay & "One of token '" & Str1 & "' (\) in '" & Str2 & "' is " & IIf(cOrTokenIn(Str2, Str1, Sep1), "present", "not present") & vbCrLf & vbCrLf
  1158.    
  1159.    Str1 = "quick\JUMPS\the"
  1160.    Str2 = "THE QUICK BROWN FOX JUMPS OVER THE LAZY DOG"
  1161.    strDisplay = strDisplay & "One of token '" & Str1 & "' (\) in '" & Str2 & "' is " & IIf(cOrTokenIn(Str2, Str1, Sep1), "present", "not present") & vbCrLf & vbCrLf
  1162.  
  1163.    Str1 = LCase$("quick\jumps\THE")
  1164.    Str2 = LCase$("THE QUICK BROWN FOX JUMPS OVER THE LAZY DOG")
  1165.    strDisplay = strDisplay & "One of token '" & Str1 & "' (\) in '" & Str2 & "' is " & IIf(cOrTokenIn(Str2, Str1, Sep1), "present", "not present") & vbCrLf & vbCrLf
  1166.    
  1167.    txt_Result = strDisplay
  1168.  
  1169.    'time the function
  1170.  
  1171.    TimerStartOk = Timer
  1172.    
  1173.    For i = 1 To Iteration
  1174.       strResult = cOrTokenIn(Str2, Str1, Sep1)
  1175.    Next i
  1176.    
  1177.    mdiMCSTR.pnl_Timer = Int((Timer - TimerStartOk) * 1000)
  1178.    
  1179.  
  1180. End Sub
  1181.  
  1182. Private Sub TestAndTokenX()
  1183.    
  1184.    Dim intResult        As Integer
  1185.    Dim strResult        As String
  1186.    Dim strDisplay       As String
  1187.    
  1188.    Dim i                As Integer
  1189.    
  1190.    Dim Str1             As String
  1191.    Dim Str2             As String
  1192.    Dim Sep1             As String
  1193.    
  1194.    intResult = 0
  1195.    
  1196.    strResult = ""
  1197.    strDisplay = ""
  1198.      
  1199.    Sep1 = "\"
  1200.      
  1201.    Str1 = "FOX|OVER|THE"
  1202.    Str2 = "THE QUICK BROWN FOX JUMPS OVER THE LAZY DOG"
  1203.    strDisplay = strDisplay & "All tokens '" & Str1 & "' (|) in '" & Str2 & "' are " & IIf(cAndToken(Str2, Str1), "present", "not present") & vbCrLf & vbCrLf
  1204.    
  1205.    Str1 = "quick|jumps|the"
  1206.    Str2 = "THE QUICK BROWN FOX JUMPS OVER THE LAZY DOG"
  1207.    strDisplay = strDisplay & "All tokens '" & Str1 & "' (|) in '" & Str2 & "' are " & IIf(cAndToken(Str2, Str1), "present", "not present") & vbCrLf & vbCrLf
  1208.  
  1209.    Str1 = "FOX\OVER\THE"
  1210.    Str2 = "THE QUICK BROWN FOX JUMPS OVER THE LAZY DOG"
  1211.    strDisplay = strDisplay & "All tokens '" & Str1 & "' (\) in '" & Str2 & "' are " & IIf(cAndTokenIn(Str2, Str1, Sep1), "present", "not present") & vbCrLf & vbCrLf
  1212.    
  1213.    Str1 = "quick\jumps\the"
  1214.    Str2 = "THE QUICK BROWN FOX JUMPS OVER THE LAZY DOG"
  1215.    strDisplay = strDisplay & "All tokens '" & Str1 & "' (\) in '" & Str2 & "' are " & IIf(cAndTokenIn(Str2, Str1, Sep1), "present", "not present") & vbCrLf & vbCrLf
  1216.  
  1217.    Str1 = "FOX/OVER/THE"
  1218.    Str2 = "THE QUICK BROWN FOX JUMPS OVER THE LAZY DOG"
  1219.    strDisplay = strDisplay & "All tokens '" & Str1 & "' (\) in '" & Str2 & "' are " & IIf(cAndTokenIn(Str2, Str1, Sep1), "present", "not present") & vbCrLf & vbCrLf
  1220.    
  1221.    Str1 = "quick\JUMPS\the"
  1222.    Str2 = "THE QUICK BROWN FOX JUMPS OVER THE LAZY DOG"
  1223.    strDisplay = strDisplay & "All tokens '" & Str1 & "' (\) in '" & Str2 & "' are " & IIf(cAndTokenIn(Str2, Str1, Sep1), "present", "not present") & vbCrLf & vbCrLf
  1224.  
  1225.    Str1 = LCase$("quick\jumps\THE")
  1226.    Str2 = LCase$("THE QUICK BROWN FOX JUMPS OVER THE LAZY DOG")
  1227.    strDisplay = strDisplay & "All tokens '" & Str1 & "' (\) in '" & Str2 & "' are " & IIf(cAndTokenIn(Str2, Str1, Sep1), "present", "not present") & vbCrLf & vbCrLf
  1228.    
  1229.    txt_Result = strDisplay
  1230.  
  1231.    'time the function
  1232.  
  1233.    TimerStartOk = Timer
  1234.    
  1235.    For i = 1 To Iteration
  1236.       strResult = cOrTokenIn(Str2, Str1, Sep1)
  1237.    Next i
  1238.    
  1239.    mdiMCSTR.pnl_Timer = Int((Timer - TimerStartOk) * 1000)
  1240.    
  1241.  
  1242. End Sub
  1243.  
  1244. Private Sub TestReverse()
  1245.    
  1246.    Dim intResult        As Integer
  1247.    Dim strResult        As String
  1248.    Dim strDisplay       As String
  1249.    
  1250.    Dim i                As Integer
  1251.    
  1252.    Dim Str1             As String
  1253.    Dim Str2             As String
  1254.    
  1255.    intResult = 0
  1256.    
  1257.    strResult = ""
  1258.    strDisplay = ""
  1259.      
  1260.    Str1 = Text1.Text
  1261.    Str2 = cReverse(Str1)
  1262.    
  1263.    strDisplay = strDisplay & "Reverse of '" & Str1 & "' is " & vbCrLf & vbCrLf
  1264.    strDisplay = strDisplay & Str2 & vbCrLf & vbCrLf
  1265.    
  1266.    strDisplay = strDisplay & "Reverse of '" & Str2 & "' is " & vbCrLf & vbCrLf
  1267.    strDisplay = strDisplay & cReverse(Str2) & vbCrLf & vbCrLf
  1268.    
  1269.    txt_Result = strDisplay
  1270.  
  1271.    'time the function
  1272.  
  1273.    TimerStartOk = Timer
  1274.    
  1275.    For i = 1 To Iteration
  1276.       strResult = cReverse(Str1)
  1277.    Next i
  1278.    
  1279.    mdiMCSTR.pnl_Timer = Int((Timer - TimerStartOk) * 1000)
  1280.    
  1281.  
  1282. End Sub
  1283.  
  1284. Private Sub TestMixChars()
  1285.    
  1286.    Dim intResult        As Integer
  1287.    Dim strResult        As String
  1288.    Dim strDisplay       As String
  1289.    
  1290.    Dim i                As Integer
  1291.    
  1292.    Dim Str1             As String
  1293.    Dim Str2             As String
  1294.    
  1295.    intResult = 0
  1296.    
  1297.    strResult = ""
  1298.    strDisplay = ""
  1299.      
  1300.    Str1 = Text1.Text
  1301.    Str2 = cMixChars(Str1)
  1302.    
  1303.    strDisplay = strDisplay & "MixChars of '" & Str1 & "' is " & vbCrLf & vbCrLf
  1304.    strDisplay = strDisplay & Str2 & vbCrLf & vbCrLf
  1305.    
  1306.    strDisplay = strDisplay & "MixChars of '" & Str2 & "' is " & vbCrLf & vbCrLf
  1307.    strDisplay = strDisplay & cMixChars(Str2) & vbCrLf & vbCrLf
  1308.    
  1309.    Str1 = "TIME TO WIN (32-Bit)"
  1310.    Str2 = cMixChars(Str1)
  1311.    
  1312.    strDisplay = strDisplay & "MixChars of '" & Str1 & "' is " & vbCrLf & vbCrLf
  1313.    strDisplay = strDisplay & Str2 & vbCrLf & vbCrLf
  1314.    
  1315.    strDisplay = strDisplay & "MixChars of '" & Str2 & "' is " & vbCrLf & vbCrLf
  1316.    strDisplay = strDisplay & cMixChars(Str2) & vbCrLf & vbCrLf
  1317.    
  1318.    Str1 = "Under the sky, the sun lights"
  1319.    Str2 = cMixChars(Str1)
  1320.    
  1321.    strDisplay = strDisplay & "MixChars of '" & Str1 & "' is " & vbCrLf & vbCrLf
  1322.    strDisplay = strDisplay & Str2 & vbCrLf & vbCrLf
  1323.    
  1324.    strDisplay = strDisplay & "MixChars of '" & Str2 & "' is " & vbCrLf & vbCrLf
  1325.    strDisplay = strDisplay & cMixChars(Str2)
  1326.    
  1327.    txt_Result = strDisplay
  1328.  
  1329.    'time the function
  1330.  
  1331.    TimerStartOk = Timer
  1332.    
  1333.    For i = 1 To Iteration
  1334.       strResult = cMixChars(Str1)
  1335.    Next i
  1336.    
  1337.    mdiMCSTR.pnl_Timer = Int((Timer - TimerStartOk) * 1000)
  1338.    
  1339.  
  1340. End Sub
  1341.  
  1342. Private Sub TestScrollX()
  1343.    
  1344.    Dim intResult        As Integer
  1345.    Dim strResult        As String
  1346.    Dim strDisplay       As String
  1347.    
  1348.    Dim i                As Integer
  1349.    
  1350.    Dim Str1             As String
  1351.    Dim Str2             As String
  1352.    
  1353.    intResult = 0
  1354.    
  1355.    strResult = ""
  1356.    strDisplay = ""
  1357.      
  1358.    Str1 = Text1.Text
  1359.    Str2 = Text1.Text
  1360.    
  1361.    strDisplay = strDisplay & "Scroll 7 times from left into '" & Str1 & "' is " & vbCrLf & vbCrLf
  1362.    
  1363.    For i = 1 To 7
  1364.       Str2 = cScrollL(Str2)
  1365.       strDisplay = strDisplay & Str2 & vbCrLf
  1366.    Next i
  1367.    
  1368.    strDisplay = strDisplay & vbCrLf
  1369.    
  1370.    Str1 = Text1.Text
  1371.    Str2 = Text1.Text
  1372.    
  1373.    strDisplay = strDisplay & "Scroll 7 times from right into '" & Str1 & "' is " & vbCrLf & vbCrLf
  1374.    
  1375.    For i = 1 To 7
  1376.       Str2 = cScrollR(Str2)
  1377.       strDisplay = strDisplay & Str2 & vbCrLf
  1378.    Next i
  1379.    
  1380.    strDisplay = strDisplay & vbCrLf
  1381.    
  1382.    txt_Result = strDisplay
  1383.  
  1384.    'time the function
  1385.  
  1386.    TimerStartOk = Timer
  1387.    
  1388.    For i = 1 To Iteration
  1389.       strResult = cScrollL(Str1)
  1390.    Next i
  1391.    
  1392.    mdiMCSTR.pnl_Timer = Int((Timer - TimerStartOk) * 1000)
  1393.    
  1394.  
  1395. End Sub
  1396.  
  1397. Private Sub TestChangeChars()
  1398.    
  1399.    Dim intResult        As Integer
  1400.    Dim strResult        As String
  1401.    Dim strDisplay       As String
  1402.    
  1403.    Dim i                As Integer
  1404.    
  1405.    Dim Str1             As String
  1406.    
  1407.    intResult = 0
  1408.    
  1409.    strResult = ""
  1410.    strDisplay = ""
  1411.      
  1412.    Str1 = Text1.Text
  1413.    strDisplay = strDisplay & "Change 'AZM' into 'qyc' of '" & Str1 & "' is " & vbCrLf & vbCrLf
  1414.    Call cChangeChars(Str1, "AZM", "qyc")
  1415.    strDisplay = strDisplay & Str1 & vbCrLf & vbCrLf
  1416.  
  1417.    Str1 = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
  1418.    strDisplay = strDisplay & "Change 'AZM' into 'qyc' of '" & Str1 & "' is " & vbCrLf & vbCrLf
  1419.    Call cChangeChars(Str1, "AZM", "qyc")
  1420.    strDisplay = strDisplay & Str1 & vbCrLf & vbCrLf
  1421.  
  1422.    strDisplay = strDisplay & "Change 'qyc' into '+-*' of '" & Str1 & "' is " & vbCrLf & vbCrLf
  1423.    Call cChangeChars(Str1, "qyc", "+-*")
  1424.    strDisplay = strDisplay & Str1 & vbCrLf & vbCrLf
  1425.  
  1426.    txt_Result = strDisplay
  1427.  
  1428.    'time the function
  1429.  
  1430.    Str1 = Text1.Text
  1431.    
  1432.    TimerStartOk = Timer
  1433.    
  1434.    For i = 1 To Iteration
  1435.       Call cChangeChars(Str1, "AZM", "qyc")
  1436.    Next i
  1437.    
  1438.    mdiMCSTR.pnl_Timer = Int((Timer - TimerStartOk) * 1000)
  1439.    
  1440.  
  1441. End Sub
  1442.  
  1443. Private Sub TestChangeCharsUntil()
  1444.    
  1445.    Dim intResult        As Integer
  1446.    Dim strResult        As String
  1447.    Dim strDisplay       As String
  1448.    
  1449.    Dim i                As Integer
  1450.    
  1451.    Dim Str1             As String
  1452.    
  1453.    intResult = 0
  1454.    
  1455.    strResult = ""
  1456.    strDisplay = ""
  1457.      
  1458.    Str1 = Text1.Text
  1459.    strDisplay = strDisplay & "Change 'AZM' into 'qyc' of '" & Str1 & "' until 'N' is " & vbCrLf & vbCrLf
  1460.    Call cChangeCharsUntil(Str1, "AZM", "qyc", "N")
  1461.    strDisplay = strDisplay & Str1 & vbCrLf & vbCrLf
  1462.  
  1463.    Str1 = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
  1464.    strDisplay = strDisplay & "Change 'AZM' into 'qyc' of '" & Str1 & "' until 'N' is " & vbCrLf & vbCrLf
  1465.    Call cChangeCharsUntil(Str1, "AZM", "qyc", "N")
  1466.    strDisplay = strDisplay & Str1 & vbCrLf & vbCrLf
  1467.  
  1468.    strDisplay = strDisplay & "Change 'qyc' into '+-*' of '" & Str1 & "' until 'N' is " & vbCrLf & vbCrLf
  1469.    Call cChangeCharsUntil(Str1, "qyc", "+-*", "N")
  1470.    strDisplay = strDisplay & Str1 & vbCrLf & vbCrLf
  1471.  
  1472.    txt_Result = strDisplay
  1473.  
  1474.    'time the function
  1475.  
  1476.    Str1 = Text1.Text
  1477.    
  1478.    TimerStartOk = Timer
  1479.    
  1480.    For i = 1 To Iteration
  1481.       Call cChangeCharsUntil(Str1, "AZM", "qyc", "N")
  1482.    Next i
  1483.    
  1484.    mdiMCSTR.pnl_Timer = Int((Timer - TimerStartOk) * 1000)
  1485.    
  1486.  
  1487. End Sub
  1488.  
  1489. Private Sub TestCheckChars()
  1490.    
  1491.    Dim intResult        As Integer
  1492.    Dim strResult        As String
  1493.    Dim strDisplay       As String
  1494.    
  1495.    Dim i                As Integer
  1496.    
  1497.    Dim Str1             As String
  1498.    
  1499.    intResult = 0
  1500.    
  1501.    strResult = ""
  1502.    strDisplay = ""
  1503.      
  1504.    Str1 = Text1.Text
  1505.    strDisplay = strDisplay & "Check 'A','Z' in '" & Str1 & "' is " & vbCrLf & vbCrLf
  1506.    strDisplay = strDisplay & IIf(cCheckChars(Str1, "AZ"), "all present", "not all present") & vbCrLf & vbCrLf
  1507.    strDisplay = strDisplay & "Check 'a','Z' in '" & Str1 & "' is " & vbCrLf & vbCrLf
  1508.    strDisplay = strDisplay & IIf(cCheckChars(Str1, "aZ"), "all present", "not all present") & vbCrLf & vbCrLf
  1509.  
  1510.    Str1 = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
  1511.    strDisplay = strDisplay & "Check 'A','Z' in '" & Str1 & "' is " & vbCrLf & vbCrLf
  1512.    strDisplay = strDisplay & IIf(cCheckChars(Str1, "AZ"), "all present", "not all present") & vbCrLf & vbCrLf
  1513.    strDisplay = strDisplay & "Check 'a','Z' in '" & Str1 & "' is " & vbCrLf & vbCrLf
  1514.    strDisplay = strDisplay & IIf(cCheckChars(Str1, "aZ"), "all present", "not all present")
  1515.    
  1516.    txt_Result = strDisplay
  1517.  
  1518.    'time the function
  1519.  
  1520.    Str1 = Text1.Text
  1521.    
  1522.    TimerStartOk = Timer
  1523.    
  1524.    For i = 1 To Iteration
  1525.       intResult = cCheckChars(Str1, "aZ")
  1526.    Next i
  1527.    
  1528.    mdiMCSTR.pnl_Timer = Int((Timer - TimerStartOk) * 1000)
  1529.    
  1530.  
  1531. End Sub
  1532.  
  1533. Private Sub TestFilterChars()
  1534.    
  1535.    Dim intResult        As Integer
  1536.    Dim strResult        As String
  1537.    Dim strDisplay       As String
  1538.    
  1539.    Dim i                As Integer
  1540.    
  1541.    Dim Str1             As String
  1542.    
  1543.    intResult = 0
  1544.    
  1545.    strResult = ""
  1546.    strDisplay = ""
  1547.      
  1548.    Str1 = Text1.Text
  1549.    strDisplay = strDisplay & "Filter 'B','/' in '" & Str1 & "' is " & vbCrLf & vbCrLf
  1550.    strDisplay = strDisplay & cFilterChars(Str1, "B/") & vbCrLf & vbCrLf
  1551.  
  1552.    Str1 = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
  1553.    strDisplay = strDisplay & "Filter 'B','Y' in '" & Str1 & "' is " & vbCrLf & vbCrLf
  1554.    strDisplay = strDisplay & cFilterChars(Str1, "BY")
  1555.    
  1556.    txt_Result = strDisplay
  1557.  
  1558.    'time the function
  1559.  
  1560.    Str1 = Text1.Text
  1561.    
  1562.    TimerStartOk = Timer
  1563.    
  1564.    For i = 1 To Iteration
  1565.       strResult = cFilterChars(Str1, "B/")
  1566.    Next i
  1567.    
  1568.    mdiMCSTR.pnl_Timer = Int((Timer - TimerStartOk) * 1000)
  1569.    
  1570.  
  1571. End Sub
  1572.  
  1573. Private Sub TestFilterNotChars()
  1574.    
  1575.    Dim intResult        As Integer
  1576.    Dim strResult        As String
  1577.    Dim strDisplay       As String
  1578.    
  1579.    Dim i                As Integer
  1580.    
  1581.    Dim Str1             As String
  1582.    
  1583.    intResult = 0
  1584.    
  1585.    strResult = ""
  1586.    strDisplay = ""
  1587.      
  1588.    Str1 = Text1.Text
  1589.    strDisplay = strDisplay & "Filter not 'B','/' in '" & Str1 & "' is " & vbCrLf & vbCrLf
  1590.    strDisplay = strDisplay & cFilterNotChars(Str1, "B/") & vbCrLf & vbCrLf
  1591.  
  1592.    Str1 = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
  1593.    strDisplay = strDisplay & "Filter not 'B','Y' in '" & Str1 & "' is " & vbCrLf & vbCrLf
  1594.    strDisplay = strDisplay & cFilterNotChars(Str1, "BY")
  1595.    
  1596.    txt_Result = strDisplay
  1597.  
  1598.    'time the function
  1599.  
  1600.    Str1 = Text1.Text
  1601.    
  1602.    TimerStartOk = Timer
  1603.    
  1604.    For i = 1 To Iteration
  1605.       strResult = cFilterNotChars(Str1, "B/")
  1606.    Next i
  1607.    
  1608.    mdiMCSTR.pnl_Timer = Int((Timer - TimerStartOk) * 1000)
  1609.    
  1610.  
  1611. End Sub
  1612.  
  1613. Private Sub TestFilterBlocks()
  1614.    
  1615.    Dim intResult        As Integer
  1616.    Dim strResult        As String
  1617.    Dim strDisplay       As String
  1618.    
  1619.    Dim i                As Integer
  1620.    
  1621.    Dim Str1             As String
  1622.    
  1623.    intResult = 0
  1624.    
  1625.    strResult = ""
  1626.    strDisplay = ""
  1627.      
  1628.    Str1 = Text1.Text
  1629.    
  1630.    strDisplay = strDisplay & "Filter blocks between '/' and '/' in '" & Str1 & "' is " & vbCrLf & vbCrLf
  1631.    strDisplay = strDisplay & "'" & cFilterBlocks(Str1, "//") & "'" & vbCrLf & vbCrLf
  1632.  
  1633.    strDisplay = strDisplay & "Filter blocks between 'B' and 'I' in '" & Str1 & "' is " & vbCrLf & vbCrLf
  1634.    strDisplay = strDisplay & "'" & cFilterBlocks(Str1, "BI") & "'" & vbCrLf & vbCrLf
  1635.  
  1636.    Str1 = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
  1637.    
  1638.    strDisplay = strDisplay & "Filter blocks between '/' and '/' in '" & Str1 & "' is " & vbCrLf & vbCrLf
  1639.    strDisplay = strDisplay & "'" & cFilterBlocks(Str1, "//") & "'" & vbCrLf & vbCrLf
  1640.  
  1641.    strDisplay = strDisplay & "Filter blocks between 'B' and 'I' in '" & Str1 & "' is " & vbCrLf & vbCrLf
  1642.    strDisplay = strDisplay & "'" & cFilterBlocks(Str1, "BI") & "'"
  1643.    
  1644.    txt_Result = strDisplay
  1645.  
  1646.    'time the function
  1647.  
  1648.    Str1 = Text1.Text
  1649.    
  1650.    TimerStartOk = Timer
  1651.    
  1652.    For i = 1 To Iteration
  1653.       strResult = cFilterBlocks(Str1, "BI")
  1654.    Next i
  1655.    
  1656.    mdiMCSTR.pnl_Timer = Int((Timer - TimerStartOk) * 1000)
  1657.    
  1658.  
  1659. End Sub
  1660.  
  1661. Private Sub TestResizeString()
  1662.    
  1663.    Dim intResult        As Integer
  1664.    Dim strResult        As String
  1665.    Dim strDisplay       As String
  1666.    
  1667.    Dim i                As Integer
  1668.    
  1669.    Dim Str1             As String
  1670.    
  1671.    intResult = 0
  1672.    
  1673.    strResult = ""
  1674.    strDisplay = ""
  1675.      
  1676.    Str1 = Text1.Text
  1677.    
  1678.    strDisplay = strDisplay & "'" & Str1 & "' resized from " & Len(Str1) & " to 5 chars is " & vbCrLf & vbCrLf
  1679.    strDisplay = strDisplay & "'" & cResizeString(Str1, 5) & "'" & vbCrLf & vbCrLf
  1680.    
  1681.    strDisplay = strDisplay & "'" & Str1 & "' resized from " & Len(Str1) & " to 10 chars is " & vbCrLf & vbCrLf
  1682.    strDisplay = strDisplay & "'" & cResizeString(Str1, 10) & "'" & vbCrLf & vbCrLf
  1683.  
  1684.    strDisplay = strDisplay & "'" & Str1 & "' resized from " & Len(Str1) & " to 50 chars is " & vbCrLf & vbCrLf
  1685.    strDisplay = strDisplay & "'" & cResizeString(Str1, 50) & "'" & vbCrLf & vbCrLf
  1686.  
  1687.    strDisplay = strDisplay & "'" & Str1 & "' resized from " & Len(Str1) & " to -1 chars is " & vbCrLf & vbCrLf
  1688.    strDisplay = strDisplay & "'" & cResizeString(Str1, -1) & "'" & vbCrLf & vbCrLf
  1689.  
  1690.    Str1 = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
  1691.    
  1692.    strDisplay = strDisplay & "'" & Str1 & "' resized from " & Len(Str1) & " to 5 chars is " & vbCrLf & vbCrLf
  1693.    strDisplay = strDisplay & "'" & cResizeString(Str1, 5) & "'" & vbCrLf & vbCrLf
  1694.    
  1695.    strDisplay = strDisplay & "'" & Str1 & "' resized from " & Len(Str1) & " to 10 chars is " & vbCrLf & vbCrLf
  1696.    strDisplay = strDisplay & "'" & cResizeString(Str1, 10) & "'" & vbCrLf & vbCrLf
  1697.    
  1698.    strDisplay = strDisplay & "'" & Str1 & "' resized from " & Len(Str1) & " to 50 chars is " & vbCrLf & vbCrLf
  1699.    strDisplay = strDisplay & "'" & cResizeString(Str1, 50) & "'" & vbCrLf & vbCrLf
  1700.  
  1701.    strDisplay = strDisplay & "'" & Str1 & "' resized from " & Len(Str1) & " to -1 chars is " & vbCrLf & vbCrLf
  1702.    strDisplay = strDisplay & "'" & cResizeString(Str1, -1) & "'"
  1703.  
  1704.    txt_Result = strDisplay
  1705.  
  1706.    'time the function
  1707.  
  1708.    Str1 = Text1.Text
  1709.    
  1710.    TimerStartOk = Timer
  1711.    
  1712.    For i = 1 To Iteration
  1713.       strResult = cResizeString(Str1, 5)
  1714.    Next i
  1715.    
  1716.    mdiMCSTR.pnl_Timer = Int((Timer - TimerStartOk) * 1000)
  1717.    
  1718.  
  1719. End Sub
  1720.  
  1721. Private Sub TestResizeStringAndFill()
  1722.    
  1723.    Dim intResult        As Integer
  1724.    Dim strResult        As String
  1725.    Dim strDisplay       As String
  1726.    
  1727.    Dim i                As Integer
  1728.    
  1729.    Dim Str1             As String
  1730.    
  1731.    intResult = 0
  1732.    
  1733.    strResult = ""
  1734.    strDisplay = ""
  1735.      
  1736.    Str1 = Text1.Text
  1737.    
  1738.    strDisplay = strDisplay & "'" & Str1 & "' resized from " & Len(Str1) & " to 5 chars is " & vbCrLf & vbCrLf
  1739.    strDisplay = strDisplay & "'" & cResizeStringAndFill(Str1, 5, "*") & "'" & vbCrLf & vbCrLf
  1740.    
  1741.    strDisplay = strDisplay & "'" & Str1 & "' resized from " & Len(Str1) & " to 10 chars is " & vbCrLf & vbCrLf
  1742.    strDisplay = strDisplay & "'" & cResizeStringAndFill(Str1, 10, "*") & "'" & vbCrLf & vbCrLf
  1743.  
  1744.    strDisplay = strDisplay & "'" & Str1 & "' resized from " & Len(Str1) & " to 50 chars is " & vbCrLf & vbCrLf
  1745.    strDisplay = strDisplay & "'" & cResizeStringAndFill(Str1, 50, "*") & "'" & vbCrLf & vbCrLf
  1746.  
  1747.    strDisplay = strDisplay & "'" & Str1 & "' resized from " & Len(Str1) & " to -1 chars is " & vbCrLf & vbCrLf
  1748.    strDisplay = strDisplay & "'" & cResizeStringAndFill(Str1, -1, "*") & "'" & vbCrLf & vbCrLf
  1749.  
  1750.    Str1 = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
  1751.    
  1752.    strDisplay = strDisplay & "'" & Str1 & "' resized from " & Len(Str1) & " to 5 chars is " & vbCrLf & vbCrLf
  1753.    strDisplay = strDisplay & "'" & cResizeStringAndFill(Str1, 5, "*") & "'" & vbCrLf & vbCrLf
  1754.    
  1755.    strDisplay = strDisplay & "'" & Str1 & "' resized from " & Len(Str1) & " to 10 chars is " & vbCrLf & vbCrLf
  1756.    strDisplay = strDisplay & "'" & cResizeStringAndFill(Str1, 10, "*") & "'" & vbCrLf & vbCrLf
  1757.    
  1758.    strDisplay = strDisplay & "'" & Str1 & "' resized from " & Len(Str1) & " to 50 chars is " & vbCrLf & vbCrLf
  1759.    strDisplay = strDisplay & "'" & cResizeStringAndFill(Str1, 50, "*") & "'" & vbCrLf & vbCrLf
  1760.  
  1761.    strDisplay = strDisplay & "'" & Str1 & "' resized from " & Len(Str1) & " to -1 chars is " & vbCrLf & vbCrLf
  1762.    strDisplay = strDisplay & "'" & cResizeStringAndFill(Str1, -1, "*") & "'"
  1763.  
  1764.    txt_Result = strDisplay
  1765.  
  1766.    'time the function
  1767.  
  1768.    Str1 = Text1.Text
  1769.    
  1770.    TimerStartOk = Timer
  1771.    
  1772.    For i = 1 To Iteration
  1773.       strResult = cResizeStringAndFill(Str1, 50, "*")
  1774.    Next i
  1775.    
  1776.    mdiMCSTR.pnl_Timer = Int((Timer - TimerStartOk) * 1000)
  1777.    
  1778.  
  1779. End Sub
  1780.  
  1781. Private Sub TestCreateAndFill()
  1782.    
  1783.    Dim intResult        As Integer
  1784.    Dim strResult        As String
  1785.    Dim strDisplay       As String
  1786.    
  1787.    Dim i                As Integer
  1788.    
  1789.    Dim Str1             As String
  1790.    
  1791.    intResult = 0
  1792.    
  1793.    strResult = ""
  1794.    strDisplay = ""
  1795.      
  1796.    Str1 = Text1.Text
  1797.    
  1798.    strDisplay = strDisplay & "Create and Fill a string of 60 chars with '" & Str1 & "' is " & vbCrLf & vbCrLf
  1799.    strDisplay = strDisplay & "'" & cCreateAndFill(60, Str1) & "'" & vbCrLf & vbCrLf
  1800.    
  1801.    strDisplay = strDisplay & "Create and Fill a string of 40 chars with '" & Str1 & "' is " & vbCrLf & vbCrLf
  1802.    strDisplay = strDisplay & "'" & cCreateAndFill(40, Str1) & "'" & vbCrLf & vbCrLf
  1803.    
  1804.    Str1 = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
  1805.    
  1806.    strDisplay = strDisplay & "Create and Fill a string of 60 chars with '" & Str1 & "' is " & vbCrLf & vbCrLf
  1807.    strDisplay = strDisplay & "'" & cCreateAndFill(60, Str1) & "'" & vbCrLf & vbCrLf
  1808.    
  1809.    strDisplay = strDisplay & "Create and Fill a string of 40 chars with '" & Str1 & "' is " & vbCrLf & vbCrLf
  1810.    strDisplay = strDisplay & "'" & cCreateAndFill(40, Str1) & "'"
  1811.  
  1812.    txt_Result = strDisplay
  1813.  
  1814.    'time the function
  1815.  
  1816.    Str1 = Text1.Text
  1817.    
  1818.    TimerStartOk = Timer
  1819.    
  1820.    For i = 1 To Iteration
  1821.       strResult = cCreateAndFill(40, Str1)
  1822.    Next i
  1823.    
  1824.    mdiMCSTR.pnl_Timer = Int((Timer - TimerStartOk) * 1000)
  1825.    
  1826.  
  1827. End Sub
  1828.  
  1829. Private Sub TestFill()
  1830.    
  1831.    Dim intResult        As Integer
  1832.    Dim strResult        As String
  1833.    Dim strDisplay       As String
  1834.    
  1835.    Dim i                As Integer
  1836.    
  1837.    Dim Str1             As String
  1838.    
  1839.    intResult = 0
  1840.    
  1841.    strResult = ""
  1842.    strDisplay = ""
  1843.      
  1844.    Str1 = Text1.Text
  1845.    
  1846.    strDisplay = strDisplay & "Fill of '" & Str1 & "' with '*=' is " & vbCrLf & vbCrLf
  1847.    Call cFill(Str1, "*=")
  1848.    strDisplay = strDisplay & "'" & Str1 & "'" & vbCrLf & vbCrLf
  1849.    
  1850.    strDisplay = strDisplay & "Fill of '" & Str1 & "' with '=*=' is " & vbCrLf & vbCrLf
  1851.    Call cFill(Str1, "=*=")
  1852.    strDisplay = strDisplay & "'" & Str1 & "'" & vbCrLf & vbCrLf
  1853.    
  1854.    Str1 = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
  1855.    
  1856.    strDisplay = strDisplay & "Fill of '" & Str1 & "' with '7516' is " & vbCrLf & vbCrLf
  1857.    Call cFill(Str1, "7516")
  1858.    strDisplay = strDisplay & "'" & Str1 & "'" & vbCrLf & vbCrLf
  1859.    
  1860.    strDisplay = strDisplay & "Fill of '" & Str1 & "' with '$61.00' is " & vbCrLf & vbCrLf
  1861.    Call cFill(Str1, "$61.00")
  1862.    strDisplay = strDisplay & "'" & Str1 & "'"
  1863.    
  1864.    txt_Result = strDisplay
  1865.  
  1866.    'time the function
  1867.  
  1868.    Str1 = Text1.Text
  1869.    
  1870.    TimerStartOk = Timer
  1871.    
  1872.    For i = 1 To Iteration
  1873.       Call cFill(Str1, "*=")
  1874.    Next i
  1875.    
  1876.    mdiMCSTR.pnl_Timer = Int((Timer - TimerStartOk) * 1000)
  1877.    
  1878.  
  1879. End Sub
  1880.  
  1881. Private Sub TestLrc()
  1882.    
  1883.    Dim intResult        As Integer
  1884.    Dim strResult        As String
  1885.    Dim strDisplay       As String
  1886.    
  1887.    Dim i                As Integer
  1888.    
  1889.    Dim Str1             As String
  1890.    
  1891.    intResult = 0
  1892.    
  1893.    strResult = ""
  1894.    strDisplay = ""
  1895.      
  1896.    Str1 = Text1.Text
  1897.    strDisplay = strDisplay & "Lrc for '" & Str1 & "' is '" & cLrc(Str1) & "'" & vbCrLf & vbCrLf
  1898.    
  1899.    Str1 = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
  1900.    strDisplay = strDisplay & "Lrc for '" & Str1 & "' is '" & cLrc(Str1) & "'" & vbCrLf & vbCrLf
  1901.    
  1902.    Str1 = Chr$(2) & "0a12721536"
  1903.    strDisplay = strDisplay & "Lrc for '" & Str1 & "' is '" & cLrc(Str1) & "'"
  1904.    
  1905.    txt_Result = strDisplay
  1906.  
  1907.    'time the function
  1908.  
  1909.    Str1 = Text1.Text
  1910.    
  1911.    TimerStartOk = Timer
  1912.    
  1913.    For i = 1 To Iteration
  1914.       strResult = cLrc(Str1)
  1915.    Next i
  1916.    
  1917.    mdiMCSTR.pnl_Timer = Int((Timer - TimerStartOk) * 1000)
  1918.    
  1919.  
  1920. End Sub
  1921.  
  1922. Private Sub TestCompress()
  1923.    
  1924.    Dim intResult        As Integer
  1925.    Dim strResult        As String
  1926.    Dim strDisplay       As String
  1927.    
  1928.    Dim i                As Integer
  1929.    
  1930.    Dim Str1             As String
  1931.    
  1932.    intResult = 0
  1933.    
  1934.    strResult = ""
  1935.    strDisplay = ""
  1936.      
  1937.    Str1 = Text1.Text
  1938.    
  1939.    strDisplay = strDisplay & "Filter chr(0),chr(9),chr(32) in '" & Str1 & "' is " & vbCrLf & vbCrLf
  1940.    strDisplay = strDisplay & "'" & cCompress(Str1) & "'" & vbCrLf & vbCrLf
  1941.  
  1942.    Str1 = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
  1943.    
  1944.    strDisplay = strDisplay & "Filter chr(0),chr(9),chr(32) in '" & Str1 & "' is " & vbCrLf & vbCrLf
  1945.    strDisplay = strDisplay & "'" & cCompress(Str1) & "'" & vbCrLf & vbCrLf
  1946.    
  1947.    Str1 = "A " & Chr$(9) & "BC  "
  1948.    
  1949.    strDisplay = strDisplay & "Filter chr(0),chr(9),chr(32) in '" & Str1 & "' is " & vbCrLf & vbCrLf
  1950.    strDisplay = strDisplay & "'" & cCompress(Str1) & "'" & vbCrLf & vbCrLf
  1951.    
  1952.    txt_Result = strDisplay
  1953.  
  1954.    'time the function
  1955.  
  1956.    Str1 = Text1.Text
  1957.    
  1958.    TimerStartOk = Timer
  1959.    
  1960.    For i = 1 To Iteration
  1961.       strResult = cCompress(Str1)
  1962.    Next i
  1963.    
  1964.    mdiMCSTR.pnl_Timer = Int((Timer - TimerStartOk) * 1000)
  1965.    
  1966.  
  1967. End Sub
  1968.  
  1969. Public Sub TestCompressTab()
  1970.    
  1971.    Dim intResult        As Integer
  1972.    Dim strResult        As String
  1973.    Dim strDisplay       As String
  1974.    
  1975.    Dim i                As Integer
  1976.    
  1977.    Dim Str1             As String
  1978.    Dim Str2             As String
  1979.    Dim Str3             As String
  1980.    
  1981.    intResult = 0
  1982.    
  1983.    strResult = ""
  1984.    strDisplay = ""
  1985.      
  1986.    Str1 = "A      BC   DEF  GHIJ  "
  1987.    
  1988.    For i = 1 To 6
  1989.       Str2 = cCompressTab(Str1, i)
  1990.       Str3 = Str2
  1991.       Call cChangeChars(Str3, vbTab, "ª")
  1992.       strDisplay = strDisplay & "Compress tab (" & i & " chars) into '" & Str1 & "' is '" & Str3 & "'" & vbCrLf
  1993.       strDisplay = strDisplay & "Expand tab (" & i & " chars) into '" & Str3 & "' is '" & cExpandTab(Str2, i) & "'" & vbCrLf & vbCrLf
  1994.    Next i
  1995.  
  1996.    txt_Result = strDisplay
  1997.  
  1998.    'time the function
  1999.  
  2000.    Str1 = Text1.Text
  2001.    
  2002.    TimerStartOk = Timer
  2003.    
  2004.    For i = 1 To Iteration
  2005.       strResult = cCompressTab(Str1, 3)
  2006.    Next i
  2007.    
  2008.    mdiMCSTR.pnl_Timer = Int((Timer - TimerStartOk) * 1000)
  2009.    
  2010.  
  2011. End Sub
  2012.  
  2013. Private Sub TestCompact()
  2014.    
  2015.    Dim intResult        As Integer
  2016.    Dim strResult        As String
  2017.    Dim strDisplay       As String
  2018.    
  2019.    Dim i                As Integer
  2020.    
  2021.    Dim Str1             As String
  2022.    Dim Str2             As String
  2023.    
  2024.    intResult = 0
  2025.    
  2026.    strResult = ""
  2027.    strDisplay = ""
  2028.      
  2029.    Str1 = "987654321"
  2030.    Str2 = cCompact(Str1)
  2031.    
  2032.    strDisplay = strDisplay & "Compact '" & Str1 & "' is '" & Str2 & "'" & vbCrLf & vbCrLf
  2033.    strDisplay = strDisplay & "Uncompact '" & Str2 & "' is '" & cUncompact(Str2) & "'" & vbCrLf & vbCrLf
  2034.  
  2035.    Str1 = "1234567890"
  2036.    Str2 = cCompact(Str1)
  2037.    
  2038.    strDisplay = strDisplay & "Compact '" & Str1 & "' is '" & Str2 & "'" & vbCrLf & vbCrLf
  2039.    strDisplay = strDisplay & "Uncompact '" & Str2 & "' is '" & cUncompact(Str2) & "'" & vbCrLf & vbCrLf
  2040.  
  2041.    Str1 = Text1.Text
  2042.    Str2 = cCompact(Str1)
  2043.    
  2044.    strDisplay = strDisplay & "Compact '" & Str1 & "' is '" & Str2 & "'" & vbCrLf & vbCrLf
  2045.    strDisplay = strDisplay & "Uncompact '" & Str2 & "' is '" & cUncompact(Str2) & "'" & vbCrLf & vbCrLf
  2046.  
  2047.    txt_Result = strDisplay
  2048.  
  2049.    'time the function
  2050.  
  2051.    Str1 = Text1.Text
  2052.    
  2053.    TimerStartOk = Timer
  2054.    
  2055.    For i = 1 To Iteration
  2056.       strResult = cCompact(Str1)
  2057.    Next i
  2058.    
  2059.    mdiMCSTR.pnl_Timer = Int((Timer - TimerStartOk) * 1000)
  2060.    
  2061.  
  2062. End Sub
  2063.  
  2064. Private Sub TestAlign()
  2065.    
  2066.    Dim intResult        As Integer
  2067.    Dim strResult        As String
  2068.    Dim strDisplay       As String
  2069.    
  2070.    Dim i                As Integer
  2071.    
  2072.    Dim Str1             As String
  2073.    Dim Str2             As String
  2074.    
  2075.    intResult = 0
  2076.    
  2077.    strResult = ""
  2078.    strDisplay = ""
  2079.      
  2080.    Str1 = "T2WIN-32"
  2081.    
  2082.    strDisplay = strDisplay & "Left Align of '" & Str1 & "' is " & vbCrLf & vbCrLf
  2083.    strDisplay = strDisplay & "'" & cAlign(Str1, -1, 30) & "'" & vbCrLf & vbCrLf
  2084.    
  2085.    strDisplay = strDisplay & "Center Align of '" & Str1 & "' is " & vbCrLf & vbCrLf
  2086.    strDisplay = strDisplay & "'" & cAlign(Str1, 0, 30) & "'" & vbCrLf & vbCrLf
  2087.    
  2088.    strDisplay = strDisplay & "Right Align of '" & Str1 & "' is " & vbCrLf & vbCrLf
  2089.    strDisplay = strDisplay & "'" & cAlign(Str1, 1, 30) & "'" & vbCrLf & vbCrLf
  2090.    
  2091.    Str1 = Text1.Text
  2092.    
  2093.    strDisplay = strDisplay & "Left Align of '" & Str1 & "' is " & vbCrLf & vbCrLf
  2094.    strDisplay = strDisplay & "'" & cAlign(Str1, -1, 50) & "'" & vbCrLf & vbCrLf
  2095.    
  2096.    strDisplay = strDisplay & "Center Align of '" & Str1 & "' is " & vbCrLf & vbCrLf
  2097.    strDisplay = strDisplay & "'" & cAlign(Str1, 0, 50) & "'" & vbCrLf & vbCrLf
  2098.    
  2099.    strDisplay = strDisplay & "Right Align of '" & Str1 & "' is " & vbCrLf & vbCrLf
  2100.    strDisplay = strDisplay & "'" & cAlign(Str1, 1, 50) & "'"
  2101.    
  2102.    txt_Result = strDisplay
  2103.  
  2104.    'time the function
  2105.  
  2106.    Str1 = Text1.Text
  2107.    
  2108.    TimerStartOk = Timer
  2109.    
  2110.    For i = 1 To Iteration
  2111.       strResult = cAlign(Str1, 1, 30)
  2112.    Next i
  2113.    
  2114.    mdiMCSTR.pnl_Timer = Int((Timer - TimerStartOk) * 1000)
  2115.    
  2116.  
  2117. End Sub
  2118.  
  2119. Private Sub TestProperName()
  2120.    
  2121.    Dim intResult        As Integer
  2122.    Dim strResult        As String
  2123.    Dim strDisplay       As String
  2124.    
  2125.    Dim i                As Integer
  2126.    
  2127.    Dim Str1             As String
  2128.    Dim Str2             As String
  2129.    
  2130.    intResult = 0
  2131.    
  2132.    strResult = ""
  2133.    strDisplay = ""
  2134.      
  2135.    Str1 = Text1.Text
  2136.    strDisplay = strDisplay + "ProperName of '" & Str1 & "' is " & cProperName(Str1) & vbCrLf & vbCrLf
  2137.    Str1 = "John fitz,jr"
  2138.    strDisplay = strDisplay + "ProperName of '" & Str1 & "' is " & cProperName(Str1) & vbCrLf & vbCrLf
  2139.    Str1 = "john Fitz, jr"
  2140.    strDisplay = strDisplay + "ProperName of '" & Str1 & "' is " & cProperName(Str1) & vbCrLf & vbCrLf
  2141.    Str1 = "macdonald"
  2142.    strDisplay = strDisplay + "ProperName of '" & Str1 & "' is " & cProperName(Str1) & vbCrLf & vbCrLf
  2143.    Str1 = "mac donald"
  2144.    strDisplay = strDisplay + "ProperName of '" & Str1 & "' is " & cProperName(Str1)
  2145.                   
  2146.    txt_Result = strDisplay
  2147.  
  2148.    'time the function
  2149.  
  2150.    Str1 = Text1.Text
  2151.    
  2152.    TimerStartOk = Timer
  2153.    
  2154.    For i = 1 To Iteration
  2155.       strResult = cProperName(Str1)
  2156.    Next i
  2157.    
  2158.    mdiMCSTR.pnl_Timer = Int((Timer - TimerStartOk) * 1000)
  2159.    
  2160.  
  2161. End Sub
  2162.  
  2163. Private Sub TestProperName2()
  2164.    
  2165.    Dim intResult        As Integer
  2166.    Dim strResult        As String
  2167.    Dim strDisplay       As String
  2168.    
  2169.    Dim i                As Integer
  2170.    
  2171.    Dim Str1             As String
  2172.    Dim Str2             As String
  2173.    
  2174.    intResult = 0
  2175.    
  2176.    strResult = ""
  2177.    strDisplay = ""
  2178.      
  2179.    Str1 = Text1.Text
  2180.    strDisplay = strDisplay + "ProperName2 of '" & Str1 & "' is '" & cProperName2(Str1, "", 0) & "'" & vbCrLf & vbCrLf
  2181.    Str1 = "JOHN FITZ,JR"
  2182.    strDisplay = strDisplay + "ProperName2 of '" & Str1 & "' is '" & cProperName2(Str1, "", PN_UPPERCASE Or PN_PUNCTUATION) & "'" & vbCrLf & vbCrLf
  2183.    Str1 = "john Fitz,jr"
  2184.    strDisplay = strDisplay + "ProperName2 of '" & Str1 & "' is '" & cProperName2(Str1, "", PN_PUNCTUATION) & "'" & vbCrLf & vbCrLf
  2185.    Str1 = "macdonald"
  2186.    strDisplay = strDisplay + "ProperName2 of '" & Str1 & "' is '" & cProperName2(Str1, "", 0) & "'" & vbCrLf & vbCrLf
  2187.    Str1 = "mac donald"
  2188.    strDisplay = strDisplay + "ProperName2 of '" & Str1 & "' is '" & cProperName2(Str1, "", 0) & "'" & vbCrLf & vbCrLf
  2189.    Str1 = "a.l. greene jr."
  2190.    strDisplay = strDisplay + "ProperName2 of '" & Str1 & "' is '" & cProperName2(Str1, "", PN_PUNCTUATION) & "'" & vbCrLf & vbCrLf
  2191.    Str1 = "shale and sandstone and till"
  2192.    strDisplay = strDisplay + "ProperName2 of '" & Str1 & "' is '" & cProperName2(Str1, "the/of/a/an/and", PN_PUNCTUATION) & "'" & vbCrLf & vbCrLf
  2193.    Str1 = "a sandstone or a shale"
  2194.    strDisplay = strDisplay + "ProperName2 of '" & Str1 & "' is '" & cProperName2(Str1, "the/or/of/a/an/and", PN_PUNCTUATION) & "'" & vbCrLf & vbCrLf
  2195.    Str1 = "RR2 BARRHEAD"
  2196.    strDisplay = strDisplay + "ProperName2 of '" & Str1 & "' is '" & cProperName2(Str1, "rr2", PN_UPPERCASE Or PN_PUNCTUATION Or PN_KEEP_ORIGINAL) & "'" & vbCrLf & vbCrLf
  2197.    Str1 = "ANDY MACDONALD"
  2198.    strDisplay = strDisplay + "ProperName2 of '" & Str1 & "' is '" & cProperName2(Str1, "mac", PN_UPPERCASE Or PN_PUNCTUATION Or PN_KEEP_ORIGINAL Or PN_ONLY_LEADER_SPACE) & "'"
  2199.                   
  2200.    txt_Result = strDisplay
  2201.  
  2202.    'time the function
  2203.  
  2204.    Str1 = Text1.Text
  2205.    
  2206.    TimerStartOk = Timer
  2207.    
  2208.    For i = 1 To Iteration
  2209.       strResult = cProperName2(Str1, "", 0)
  2210.    Next i
  2211.    
  2212.    mdiMCSTR.pnl_Timer = Int((Timer - TimerStartOk) * 1000)
  2213.    
  2214.  
  2215. End Sub
  2216.  
  2217. Private Sub TestStringSAR()
  2218.    
  2219.    Dim intResult        As Integer
  2220.    Dim strResult        As String
  2221.    Dim strDisplay       As String
  2222.    
  2223.    Dim i                As Integer
  2224.    
  2225.    Dim Str1             As String
  2226.    Dim Str2             As String
  2227.    
  2228.    intResult = 0
  2229.    
  2230.    strResult = ""
  2231.    strDisplay = ""
  2232.      
  2233.    Str1 = "T2WIN-32, T2WIN-32, T2WIN-32, T2WIN-32 IS A DLL"
  2234.    Str2 = cStringSAR(Str1, "T2WIN-32", "t2win-32", False)
  2235.    
  2236.    strDisplay = strDisplay & "Replace 'T2WIN-32' by 't2win-32'" & vbCrLf
  2237.    strDisplay = strDisplay & "     in" & vbCrLf
  2238.    strDisplay = strDisplay & Str1 & vbCrLf
  2239.    strDisplay = strDisplay & "     is" & vbCrLf
  2240.    strDisplay = strDisplay & Str2 & vbCrLf & vbCrLf
  2241.  
  2242.    Str2 = cStringSAR(Str1, "2W", "IME TO W", True)
  2243.  
  2244.    strDisplay = strDisplay & "Replace '2W' by 'IME TO W'" & vbCrLf
  2245.    strDisplay = strDisplay & "     in" & vbCrLf
  2246.    strDisplay = strDisplay & Str1 & vbCrLf
  2247.    strDisplay = strDisplay & "     is" & vbCrLf
  2248.    strDisplay = strDisplay & Str2 & vbCrLf & vbCrLf
  2249.  
  2250.    Str2 = cStringSAR(Str1, "T2WIN-32", "", True)
  2251.  
  2252.    strDisplay = strDisplay & "Replace 'T2WIN-32, ' by ''" & vbCrLf
  2253.    strDisplay = strDisplay & "     in" & vbCrLf
  2254.    strDisplay = strDisplay & Str1 & vbCrLf
  2255.    strDisplay = strDisplay & "     is" & vbCrLf
  2256.    strDisplay = strDisplay & Str2 & vbCrLf & vbCrLf
  2257.  
  2258.    Str2 = cStringSAR(Str1, "I", "i", False)
  2259.  
  2260.    strDisplay = strDisplay & "Replace 'I' by 'i'" & vbCrLf
  2261.    strDisplay = strDisplay & "     in" & vbCrLf
  2262.    strDisplay = strDisplay & Str1 & vbCrLf
  2263.    strDisplay = strDisplay & "     is" & vbCrLf
  2264.    strDisplay = strDisplay & Str2 & vbCrLf & vbCrLf
  2265.  
  2266.    txt_Result = strDisplay
  2267.  
  2268.    'time the function
  2269.  
  2270.    Str1 = Text1.Text
  2271.    
  2272.    TimerStartOk = Timer
  2273.    
  2274.    For i = 1 To Iteration
  2275.       strResult = cStringSAR(Str1, "T2WIN-32", "t2win-32", False)
  2276.    Next i
  2277.    
  2278.    mdiMCSTR.pnl_Timer = Int((Timer - TimerStartOk) * 1000)
  2279.    
  2280.  
  2281. End Sub
  2282.  
  2283. Private Sub TestToHexa()
  2284.    
  2285.    Dim intResult        As Integer
  2286.    Dim strResult        As String
  2287.    Dim strDisplay       As String
  2288.    
  2289.    Dim i                As Integer
  2290.    
  2291.    Dim Str1             As String
  2292.    Dim Str2             As String
  2293.    
  2294.    intResult = 0
  2295.    
  2296.    strResult = ""
  2297.    strDisplay = ""
  2298.    
  2299.    Str1 = Text1.Text
  2300.    Str2 = cToHexa(Str1)
  2301.    strDisplay = strDisplay & "To Hexa of '" & Str1 & "' is" & vbCrLf & vbCrLf
  2302.    strDisplay = strDisplay & "'" & Str2 & "'" & vbCrLf & vbCrLf
  2303.    strDisplay = strDisplay & "From Hexa of '" & Str2 & "' is" & vbCrLf & vbCrLf
  2304.    strDisplay = strDisplay & "'" & cFromHexa(Str2) & "'" & vbCrLf & vbCrLf
  2305.  
  2306.    Str1 = "ABCDEFGH"
  2307.    Str2 = cToHexa(Str1)
  2308.    strDisplay = strDisplay & "To Hexa of '" & Str1 & "' is" & vbCrLf & vbCrLf
  2309.    strDisplay = strDisplay & "'" & Str2 & "'" & vbCrLf & vbCrLf
  2310.    strDisplay = strDisplay & "From Hexa of '" & Str2 & "' is" & vbCrLf & vbCrLf
  2311.    strDisplay = strDisplay & "'" & cFromHexa(Str2) & "'" & vbCrLf & vbCrLf
  2312.  
  2313.    Str1 = "01234567890"
  2314.    Str2 = cToHexa(Str1)
  2315.    strDisplay = strDisplay & "To Hexa of '" & Str1 & "' is" & vbCrLf & vbCrLf
  2316.    strDisplay = strDisplay & "'" & Str2 & "'" & vbCrLf & vbCrLf
  2317.    strDisplay = strDisplay & "From Hexa of '" & Str2 & "' is" & vbCrLf & vbCrLf
  2318.    strDisplay = strDisplay & "'" & cFromHexa(Str2) & "'"
  2319.  
  2320.    txt_Result = strDisplay
  2321.  
  2322.    'time the function
  2323.  
  2324.    Str1 = Text1.Text
  2325.    
  2326.    TimerStartOk = Timer
  2327.    
  2328.    For i = 1 To Iteration
  2329.       strResult = cToHexa(Str1)
  2330.    Next i
  2331.    
  2332.    mdiMCSTR.pnl_Timer = Int((Timer - TimerStartOk) * 1000)
  2333.    
  2334.  
  2335. End Sub
  2336.  
  2337. Private Sub TestRomanArabic()
  2338.    
  2339.    Dim intResult        As Integer
  2340.    Dim strResult        As String
  2341.    Dim strDisplay       As String
  2342.    
  2343.    Dim i                As Integer
  2344.    
  2345.    Dim Str1             As String
  2346.    Dim Value            As Integer
  2347.    
  2348.    intResult = 0
  2349.    
  2350.    strResult = ""
  2351.    strDisplay = ""
  2352.    
  2353.    Str1 = UCase$(cArabicToRoman(Year(Int(Now))))
  2354.    strDisplay = strDisplay & Str1 & " in Arabic is " & cRomanToArabic(LCase$(Str1)) & vbCrLf & vbCrLf
  2355.    
  2356.    Str1 = UCase$(cArabicToRoman(Year(Int(Now)) - 1))
  2357.    strDisplay = strDisplay & Str1 & " in Arabic is " & cRomanToArabic(LCase$(Str1)) & vbCrLf & vbCrLf
  2358.    
  2359.    Str1 = UCase$(cArabicToRoman(Year(Int(Now)) + 1))
  2360.    strDisplay = strDisplay & Str1 & " in Arabic is " & cRomanToArabic(LCase$(Str1)) & vbCrLf & vbCrLf
  2361.  
  2362.    Value = Year(Int(Now))
  2363.    strDisplay = strDisplay & Value & " in Roman is " & UCase$(cArabicToRoman(Value)) & vbCrLf & vbCrLf
  2364.    Value = Year(Int(Now)) - 1
  2365.    strDisplay = strDisplay & Value & " in Roman is " & UCase$(cArabicToRoman(Value)) & vbCrLf & vbCrLf
  2366.    Value = Year(Int(Now)) + 1
  2367.    strDisplay = strDisplay & Value & " in Roman is " & UCase$(cArabicToRoman(Value)) & vbCrLf & vbCrLf
  2368.  
  2369.    txt_Result = strDisplay
  2370.  
  2371.    'time the function
  2372.  
  2373.    Str1 = Text1.Text
  2374.    
  2375.    TimerStartOk = Timer
  2376.    
  2377.    For i = 1 To Iteration
  2378.       strResult = cArabicToRoman(1996)
  2379.    Next i
  2380.    
  2381.    mdiMCSTR.pnl_Timer = Int((Timer - TimerStartOk) * 1000)
  2382.    
  2383.  
  2384. End Sub
  2385.  
  2386. Private Sub TestAsciiEbcdic()
  2387.    
  2388.    Dim intResult        As Integer
  2389.    Dim strResult        As String
  2390.    Dim strDisplay       As String
  2391.    
  2392.    Dim i                As Integer
  2393.    
  2394.    Dim Str1             As String
  2395.    Dim Str2             As String
  2396.    
  2397.    intResult = 0
  2398.    
  2399.    strResult = ""
  2400.    strDisplay = ""
  2401.    
  2402.    Str1 = Text1.Text
  2403.    Str2 = Str1
  2404.    Call cCnvASCIItoEBCDIC(Str2)
  2405.    strDisplay = strDisplay & "To EBCDIC of '" & Str1 & "' is" & vbCrLf & vbCrLf
  2406.    strDisplay = strDisplay & "'" & Str2 & "'" & vbCrLf & vbCrLf
  2407.    strDisplay = strDisplay & "To ASCII of '" & Str2 & "' is" & vbCrLf & vbCrLf
  2408.    Call cCnvEBCDICtoASCII(Str2)
  2409.    strDisplay = strDisplay & "'" & Str2 & "'" & vbCrLf & vbCrLf
  2410.  
  2411.    Str1 = "ABCDEFGH"
  2412.    Str2 = Str1
  2413.    Call cCnvASCIItoEBCDIC(Str2)
  2414.    strDisplay = strDisplay & "To EBCDIC of '" & Str1 & "' is" & vbCrLf & vbCrLf
  2415.    strDisplay = strDisplay & "'" & Str2 & "'" & vbCrLf & vbCrLf
  2416.    strDisplay = strDisplay & "To ASCII of '" & Str2 & "' is" & vbCrLf & vbCrLf
  2417.    Call cCnvEBCDICtoASCII(Str2)
  2418.    strDisplay = strDisplay & "'" & Str2 & "'" & vbCrLf & vbCrLf
  2419.  
  2420.    Str1 = "01234567890"
  2421.    Str2 = Str1
  2422.    Call cCnvASCIItoEBCDIC(Str2)
  2423.    strDisplay = strDisplay & "To EBCDIC of '" & Str1 & "' is" & vbCrLf & vbCrLf
  2424.    strDisplay = strDisplay & "'" & Str2 & "'" & vbCrLf & vbCrLf
  2425.    strDisplay = strDisplay & "To ASCII of '" & Str2 & "' is" & vbCrLf & vbCrLf
  2426.    Call cCnvEBCDICtoASCII(Str2)
  2427.    strDisplay = strDisplay & "'" & Str2 & "'"
  2428.  
  2429.    txt_Result = strDisplay
  2430.  
  2431.    'time the function
  2432.  
  2433.    Str1 = Text1.Text
  2434.    
  2435.    TimerStartOk = Timer
  2436.    
  2437.    For i = 1 To Iteration
  2438.       Call cCnvASCIItoEBCDIC(Str1)
  2439.    Next i
  2440.    
  2441.    mdiMCSTR.pnl_Timer = Int((Timer - TimerStartOk) * 1000)
  2442.    
  2443.  
  2444. End Sub
  2445.  
  2446. Private Sub TestPatternMatch()
  2447.    
  2448.    Dim intResult        As Integer
  2449.    Dim strResult        As String
  2450.    Dim strDisplay       As String
  2451.    
  2452.    Dim i                As Integer
  2453.    
  2454.    Dim Str1             As String
  2455.    Dim Str2             As String
  2456.    
  2457.    intResult = 0
  2458.    
  2459.    strResult = ""
  2460.    strDisplay = ""
  2461.    
  2462.    Str1 = "Under the blue sky, the sun lights"
  2463.  
  2464.    strDisplay = "PatternMatch '" & Str1 & "' with" & vbCrLf & vbCrLf
  2465.  
  2466.    Str2 = "*"
  2467.    strDisplay = strDisplay & "'" & Str2 & "'  is " & cPatternMatch(Str1, Str2) & vbCrLf
  2468.    Str2 = "*??*???*?"
  2469.    strDisplay = strDisplay & "'" & Str2 & "'  is " & cPatternMatch(Str1, Str2) & vbCrLf
  2470.    Str2 = "*Under*"
  2471.    strDisplay = strDisplay & "'" & Str2 & "'  is " & cPatternMatch(Str1, Str2) & vbCrLf
  2472.    Str2 = "*sky*"
  2473.    strDisplay = strDisplay & "'" & Str2 & "'  is " & cPatternMatch(Str1, Str2) & vbCrLf
  2474.    Str2 = "*lights"
  2475.    strDisplay = strDisplay & "'" & Str2 & "'  is " & cPatternMatch(Str1, Str2) & vbCrLf
  2476.    Str2 = "??der*sky*ligh??*"
  2477.    strDisplay = strDisplay & "'" & Str2 & "'  is " & cPatternMatch(Str1, Str2) & vbCrLf
  2478.    Str2 = "Under?the * s??,*"
  2479.    strDisplay = strDisplay & "'" & Str2 & "'  is " & cPatternMatch(Str1, Str2) & vbCrLf & vbCrLf
  2480.  
  2481.    Str2 = "*under*"
  2482.    strDisplay = strDisplay & "'" & Str2 & "'  is " & cPatternMatch(Str1, Str2) & vbCrLf
  2483.    Str2 = "Under*sun"
  2484.    strDisplay = strDisplay & "'" & Str2 & "'  is " & cPatternMatch(Str1, Str2) & vbCrLf
  2485.    Str2 = "Under t??e*"
  2486.    strDisplay = strDisplay & "'" & Str2 & "'  is " & cPatternMatch(Str1, Str2) & vbCrLf & vbCrLf
  2487.  
  2488.    txt_Result = strDisplay
  2489.  
  2490.    'time the function
  2491.  
  2492.    Str2 = "Under?the * s??,*"
  2493.    
  2494.    TimerStartOk = Timer
  2495.    
  2496.    For i = 1 To Iteration
  2497.       intResult = cPatternMatch(Str1, Str2)
  2498.    Next i
  2499.    
  2500.    mdiMCSTR.pnl_Timer = Int((Timer - TimerStartOk) * 1000)
  2501.    
  2502.  
  2503. End Sub
  2504.  
  2505. Private Sub TestPatternExtMatch()
  2506.    
  2507.    Dim intResult        As Integer
  2508.    Dim strResult        As String
  2509.    Dim strDisplay       As String
  2510.    
  2511.    Dim i                As Integer
  2512.    
  2513.    Dim Str1             As String
  2514.    Dim Str2             As String
  2515.    
  2516.    intResult = 0
  2517.    
  2518.    strResult = ""
  2519.    strDisplay = ""
  2520.    
  2521.    Str1 = "Under the blue sky, the sun lights"
  2522.  
  2523.    strDisplay = "PatternExtMatch '" & Str1 & "' with" & vbCrLf & vbCrLf
  2524.    
  2525.    Str2 = "*"
  2526.    strDisplay = strDisplay & "'" & Str2 & "'  is " & cPatternExtMatch(Str1, Str2) & vbCrLf
  2527.    Str2 = "*??*???*?"
  2528.    strDisplay = strDisplay & "'" & Str2 & "'  is " & cPatternExtMatch(Str1, Str2) & vbCrLf
  2529.    Str2 = "*Under*"
  2530.    strDisplay = strDisplay & "'" & Str2 & "'  is " & cPatternExtMatch(Str1, Str2) & vbCrLf
  2531.    Str2 = "*sky*"
  2532.    strDisplay = strDisplay & "'" & Str2 & "'  is " & cPatternExtMatch(Str1, Str2) & vbCrLf
  2533.    Str2 = "*lights"
  2534.    strDisplay = strDisplay & "'" & Str2 & "'  is " & cPatternExtMatch(Str1, Str2) & vbCrLf
  2535.    Str2 = "??der*sky*ligh??*"
  2536.    strDisplay = strDisplay & "'" & Str2 & "'  is " & cPatternExtMatch(Str1, Str2) & vbCrLf
  2537.    Str2 = "Under?the * s??,*"
  2538.    strDisplay = strDisplay & "'" & Str2 & "'  is " & cPatternExtMatch(Str1, Str2) & vbCrLf
  2539.    Str2 = "'U-U''a-z''a-z''a-z''a-z'?the *"
  2540.    strDisplay = strDisplay & "'" & Str2 & "'  is " & cPatternExtMatch(Str1, Str2) & vbCrLf
  2541.    Str2 = "'U-U''!A-Z''^A-Z''^A-Z''!A-Z'?the *'s-s'"
  2542.    strDisplay = strDisplay & "'" & Str2 & "'  is " & cPatternExtMatch(Str1, Str2) & vbCrLf
  2543.    Str2 = "~55~6E*~73"
  2544.    strDisplay = strDisplay & "'" & Str2 & "'  is " & cPatternExtMatch(Str1, Str2) & vbCrLf
  2545.    Str2 = "'Uu''Nn''dD''eE''opqrst'?the *'rstu'"
  2546.    strDisplay = strDisplay & "'" & Str2 & "'  is " & cPatternExtMatch(Str1, Str2) & vbCrLf
  2547.    Str2 = "Under?the *'~72~73~74~75'"
  2548.    strDisplay = strDisplay & "'" & Str2 & "'  is " & cPatternExtMatch(Str1, Str2) & vbCrLf & vbCrLf
  2549.  
  2550.    Str2 = "*under*"
  2551.    strDisplay = strDisplay & "'" & Str2 & "'  is " & cPatternExtMatch(Str1, Str2) & vbCrLf
  2552.    Str2 = "Under*sun"
  2553.    strDisplay = strDisplay & "'" & Str2 & "'  is " & cPatternExtMatch(Str1, Str2) & vbCrLf
  2554.    Str2 = "Under t??e*"
  2555.    strDisplay = strDisplay & "'" & Str2 & "'  is " & cPatternExtMatch(Str1, Str2) & vbCrLf
  2556.    Str2 = "'U-U''!a-z''^A-Z''^A-Z''!A-Z'?the *'!s-s'"
  2557.    strDisplay = strDisplay & "'" & Str2 & "'  is " & cPatternExtMatch(Str1, Str2) & vbCrLf
  2558.    Str2 = "~55~6G*~73"
  2559.    strDisplay = strDisplay & "'" & Str2 & "'  is " & cPatternExtMatch(Str1, Str2) & vbCrLf
  2560.    Str2 = "'Uu''Nn''dD''eE''opqrst'?the *'rStu'"
  2561.    strDisplay = strDisplay & "'" & Str2 & "'  is " & cPatternExtMatch(Str1, Str2) & vbCrLf
  2562.    Str2 = "Under?the *'~72~53~74~75'"
  2563.    strDisplay = strDisplay & "'" & Str2 & "'  is " & cPatternExtMatch(Str1, Str2) & vbCrLf & vbCrLf
  2564.  
  2565.    txt_Result = strDisplay
  2566.  
  2567.    'time the function
  2568.  
  2569.    Str2 = "Under?the * s??,*"
  2570.    
  2571.    TimerStartOk = Timer
  2572.    
  2573.    For i = 1 To Iteration
  2574.       intResult = cPatternExtMatch(Str1, Str2)
  2575.    Next i
  2576.    
  2577.    mdiMCSTR.pnl_Timer = Int((Timer - TimerStartOk) * 1000)
  2578.    
  2579.  
  2580. End Sub
  2581.  
  2582. Private Sub TestCheckNumericity()
  2583.    
  2584.    Dim intResult        As Integer
  2585.    Dim strResult        As String
  2586.    Dim strDisplay       As String
  2587.    
  2588.    Dim i                As Integer
  2589.    
  2590.    Dim Str1             As String
  2591.    
  2592.    intResult = 0
  2593.    
  2594.    strResult = ""
  2595.    strDisplay = ""
  2596.      
  2597.    Str1 = Text1.Text
  2598.    strDisplay = strDisplay & "'" & Str1 & "' is "
  2599.    strDisplay = strDisplay & IIf(cCheckNumericity(Str1), "Numeric", "not Numeric") & vbCrLf & vbCrLf
  2600.    
  2601.    Str1 = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
  2602.    strDisplay = strDisplay & "'" & Str1 & "' is "
  2603.    strDisplay = strDisplay & IIf(cCheckNumericity(Str1), "Numeric", "not Numeric") & vbCrLf & vbCrLf
  2604.    
  2605.    Str1 = "1234567890"
  2606.    strDisplay = strDisplay & "'" & Str1 & "' is "
  2607.    strDisplay = strDisplay & IIf(cCheckNumericity(Str1), "Numeric", "not Numeric") & vbCrLf & vbCrLf
  2608.    
  2609.    Str1 = "-1234567890"
  2610.    strDisplay = strDisplay & "'" & Str1 & "' is "
  2611.    strDisplay = strDisplay & IIf(cCheckNumericity(Str1), "Numeric", "not Numeric") & vbCrLf & vbCrLf
  2612.    
  2613.    Str1 = "+12345.67890"
  2614.    strDisplay = strDisplay & "'" & Str1 & "' is "
  2615.    strDisplay = strDisplay & IIf(cCheckNumericity(Str1), "Numeric", "not Numeric") & vbCrLf & vbCrLf
  2616.    
  2617.    txt_Result = strDisplay
  2618.  
  2619.    'time the function
  2620.  
  2621.    Str1 = Text1.Text
  2622.    
  2623.    TimerStartOk = Timer
  2624.    
  2625.    For i = 1 To Iteration
  2626.       intResult = cCheckNumericity(Str1)
  2627.    Next i
  2628.    
  2629.    mdiMCSTR.pnl_Timer = Int((Timer - TimerStartOk) * 1000)
  2630.    
  2631.  
  2632. End Sub
  2633.  
  2634. Private Sub TestAlphaDigit()
  2635.    
  2636.    Dim intResult        As Integer
  2637.    Dim strResult        As String
  2638.    Dim strDisplay       As String
  2639.    
  2640.    Dim i                As Integer
  2641.    
  2642.    Dim Str1             As String
  2643.    
  2644.    intResult = 0
  2645.    
  2646.    strResult = ""
  2647.    strDisplay = ""
  2648.      
  2649.    Str1 = "1234567890"
  2650.    
  2651.    strDisplay = strDisplay & "Add digit in '" & Str1 & "' is '" & cAddDigit(Str1) & "'" & vbCrLf & vbCrLf
  2652.    
  2653.    strDisplay = strDisplay & "Num digit in '" & Str1 & "' is '" & cNumDigit(Str1) & "'" & vbCrLf & vbCrLf
  2654.    
  2655.    strDisplay = strDisplay & "Cpl digit in '" & Str1 & "' is '" & cCplDigit(Str1) & "'" & vbCrLf & vbCrLf
  2656.    
  2657.    strDisplay = strDisplay & "Cpl alpha in '" & Str1 & "' is '" & cCplAlpha(Str1) & "'" & vbCrLf & vbCrLf & vbCrLf
  2658.    
  2659.    Str1 = Text1.Text
  2660.    
  2661.    strDisplay = strDisplay & "Add digit in '" & Str1 & "' is '" & cAddDigit(Str1) & "'" & vbCrLf & vbCrLf
  2662.    
  2663.    strDisplay = strDisplay & "Num digit in '" & Str1 & "' is '" & cNumDigit(Str1) & "'" & vbCrLf & vbCrLf
  2664.    
  2665.    strDisplay = strDisplay & "Cpl digit in '" & Str1 & "' is '" & cCplDigit(Str1) & "'" & vbCrLf & vbCrLf
  2666.    
  2667.    strDisplay = strDisplay & "Cpl alpha in '" & Str1 & "' is '" & cCplAlpha(Str1) & "'"
  2668.    
  2669.    txt_Result = strDisplay
  2670.  
  2671.    'time the function
  2672.  
  2673.    Str1 = Text1.Text
  2674.    
  2675.    TimerStartOk = Timer
  2676.    
  2677.    For i = 1 To Iteration
  2678.       intResult = cAddDigit(Str1)
  2679.    Next i
  2680.    
  2681.    mdiMCSTR.pnl_Timer = Int((Timer - TimerStartOk) * 1000)
  2682.    
  2683.  
  2684. End Sub
  2685.  
  2686. Private Sub TestH2X()
  2687.    
  2688.    Dim intResult        As Integer
  2689.    Dim strResult        As String
  2690.    Dim strDisplay       As String
  2691.    
  2692.    Dim i                As Integer
  2693.    
  2694.    Dim Str1             As String
  2695.    
  2696.    intResult = 0
  2697.    
  2698.    strResult = ""
  2699.    strDisplay = ""
  2700.      
  2701.    strDisplay = "Hexa to Integer" & vbCrLf & vbCrLf
  2702.  
  2703.    Str1 = "0"
  2704.    strDisplay = strDisplay & Str1 & " -> " & cH2I(Str1) & vbCrLf
  2705.    Str1 = "1"
  2706.    strDisplay = strDisplay & Str1 & " -> " & cH2I(Str1) & vbCrLf
  2707.    Str1 = "A"
  2708.    strDisplay = strDisplay & Str1 & " -> " & cH2I(Str1) & vbCrLf
  2709.    Str1 = "A1"
  2710.    strDisplay = strDisplay & Str1 & " -> " & cH2I(Str1) & vbCrLf
  2711.    Str1 = "A1B"
  2712.    strDisplay = strDisplay & Str1 & " -> " & cH2I(Str1) & vbCrLf
  2713.    Str1 = "7FFF"
  2714.    strDisplay = strDisplay & Str1 & " -> " & cH2I(Str1) & vbCrLf
  2715.    Str1 = "A1B2"
  2716.    strDisplay = strDisplay & Str1 & " -> " & cH2I(Str1) & vbCrLf
  2717.    Str1 = "FFFF"
  2718.    strDisplay = strDisplay & Str1 & " -> " & cH2I(Str1) & vbCrLf & vbCrLf
  2719.  
  2720.    strDisplay = strDisplay & "Hexa to Long" & vbCrLf & vbCrLf
  2721.  
  2722.    Str1 = "0"
  2723.    strDisplay = strDisplay & Str1 & " -> " & cH2L(Str1) & vbCrLf
  2724.    Str1 = "1"
  2725.    strDisplay = strDisplay & Str1 & " -> " & cH2L(Str1) & vbCrLf
  2726.    Str1 = "A"
  2727.    strDisplay = strDisplay & Str1 & " -> " & cH2L(Str1) & vbCrLf
  2728.    Str1 = "A1"
  2729.    strDisplay = strDisplay & Str1 & " -> " & cH2L(Str1) & vbCrLf
  2730.    Str1 = "A1B"
  2731.    strDisplay = strDisplay & Str1 & " -> " & cH2L(Str1) & vbCrLf
  2732.    Str1 = "A1B2"
  2733.    strDisplay = strDisplay & Str1 & " -> " & cH2L(Str1) & vbCrLf
  2734.    Str1 = "7FFFFFFF"
  2735.    strDisplay = strDisplay & Str1 & " -> " & cH2L(Str1) & vbCrLf
  2736.    Str1 = "B2A1A1B2"
  2737.    strDisplay = strDisplay & Str1 & " -> " & cH2L(Str1) & vbCrLf
  2738.    Str1 = "FFFFFFFF"
  2739.    strDisplay = strDisplay & Str1 & " -> " & cH2L(Str1) & vbCrLf & vbCrLf
  2740.    
  2741.    txt_Result = strDisplay
  2742.  
  2743.    'time the function
  2744.  
  2745.    Str1 = Text1.Text
  2746.    
  2747.    TimerStartOk = Timer
  2748.    
  2749.    For i = 1 To Iteration
  2750.       intResult = cH2I(Str1)
  2751.    Next i
  2752.    
  2753.    mdiMCSTR.pnl_Timer = Int((Timer - TimerStartOk) * 1000)
  2754.    
  2755.  
  2756. End Sub
  2757.  
  2758.  
  2759. Private Sub TestMorse()
  2760.    
  2761.    Dim intResult        As Integer
  2762.    Dim strResult        As String
  2763.    Dim strDisplay       As String
  2764.    
  2765.    Dim i                As Integer
  2766.    
  2767.    Dim Str1             As String
  2768.    
  2769.    intResult = 0
  2770.    
  2771.    strResult = ""
  2772.    strDisplay = ""
  2773.      
  2774.    Str1 = Text1.Text
  2775.    strDisplay = strDisplay + "Morse code of '" & Str1 & "' is " & cMorse(Str1) & vbCrLf & vbCrLf
  2776.  
  2777.    Str1 = "SOS"
  2778.    strDisplay = strDisplay + "Morse code of '" & Str1 & "' is " & cMorse(Str1) & vbCrLf & vbCrLf
  2779.    
  2780.    Str1 = "T2WIN-32"
  2781.    strDisplay = strDisplay + "Morse code of '" & Str1 & "' is " & cMorse(Str1) & vbCrLf & vbCrLf
  2782.    
  2783.    Str1 = "Nothing can beat the fox"
  2784.    strDisplay = strDisplay + "Morse code of '" & Str1 & "' is " & cMorse(Str1) & vbCrLf & vbCrLf
  2785.    
  2786.    txt_Result = strDisplay
  2787.  
  2788.    'time the function
  2789.  
  2790.    Str1 = Text1.Text
  2791.    
  2792.    TimerStartOk = Timer
  2793.    
  2794.    For i = 1 To Iteration
  2795.       strResult = cMorse(Str1)
  2796.    Next i
  2797.    
  2798.    mdiMCSTR.pnl_Timer = Int((Timer - TimerStartOk) * 1000)
  2799.    
  2800.  
  2801. End Sub
  2802.